Separating Angularjs and Rails apps as standalone components -
i wanted try out angularjs. however, have been trouble deciding on should located angular app.
i using rails framework backend. have seen tutorials entire angular app lives under assets/javascript folder.
i wondering if instead of living within assets/javascript folder, make live outside rails directory entirely. way, can potentially separate backend , front end entirely. (is recommended?).
i believe asset pipeline precompiles lot of assets. if separate out angularjs asset, need precompile assets somehow?
thanks
you use grunt based workflow:
- how manage angularjs workflow lots of script files
- http://newtriks.com/2013/06/11/automating-angularjs-with-yeoman-grunt-and-bower/
if start decoupled frontend, use mocks @ first can stay within angular , not lose focus switching between backend , frontend logic. advantage of building single page application can develop independently of backend api. see (http://docs.angularjs.org/api/ngmocke2e.$httpbackend) information mocking http responses.
Comments
Post a Comment