Question

I'm trying to put a static Yeoman-Angular project inside a Symfony2 project. I want to leave the Yeoman folder exactly as is. Did anyone used this structure or generator?

I've tried to put the Yeoman project folder inside the 'web' Symfony2 folder. Then i've added 'RewriteEngine Off' and 'DirectoryIndex YeomanAppFolder/app/index.html' to .htaccess from following that blog.

The server is serving index.html but the references inside the Yeoman project needs to be changed from 'scripts/app.js' to 'YeomanAppFolder/app/scripts/app.js' and i want to leave Yeoman project exactly as it is.

Any thoughts would be appreciated!

Was it helpful?

Solution

I wouldn't mix both AngularJS and Symfony apps the same way I wouldn't mix a REST API with all its clients like an Android app, an iOS app, etc. Each has its own structure, idioms and toolchains. So, they all are separate projects stored in separate repositories.

You don't need Symfony to serve an AngularJS app. A web server capable of serving static files — like nginx — is enough.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top