Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Yeoman with an MVC backend framework #1042

Closed
farzher opened this issue May 6, 2013 · 3 comments
Closed

Using Yeoman with an MVC backend framework #1042

farzher opened this issue May 6, 2013 · 3 comments

Comments

@farzher
Copy link

farzher commented May 6, 2013

This sounds outside the scope of yeoman, but I think it's relevant to anyone making a non-static website.

I'm using Laravel, a PHP framework. How am I supposed to set this up with a yo angular single page application?

I tried doing yo angular in Laravel's public folder (the documentRoot) but then I have /app and /dist and all kinds of crap in there. Also, css and js and compiled into a .tmp folder. Maybe I have to rewrite the gruntfile.js, but idk, it's just a mess. grunt server and grunt test would probably be impossible to use too because index.html wouldn't exist, it would be a view in my MVC framework.

So, I'm thinking I should just keep them separate? I'll host my angular app somewhere and have my Laravel framework just act as a RESTful API hosted somewhere else? I tried this and got Access-Control-Allow-Origin errors when trying to make ajax requests to my Laravel server; but maybe that's easier to deal with.

Any recommended way of doing this? Or is yeoman not designed for this?

@sindresorhus
Copy link
Member

So, I'm thinking I should just keep them separate?

Yup, that is the recommended practise.

@farzher
Copy link
Author

farzher commented May 9, 2013

Sounds good, thank you.

Now I just have to figure out this Access-Control-Allow-Origin thing that's not letting me ajax a different domain.

@farzher farzher closed this as completed May 9, 2013
@sindresorhus
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants