angularjs - Angular to use Rails templates + Routing -


rails provide strong template engine out of box , it. wondering if there way use it? maybe angular templates can wrapped inside rails lives in our views directory. can call metatemplates.

so instead of angular templates living in asset directory feel not way?

also need make use of rails routes inside angular @ point. example signout functionality.

afaik, let ruby serve angular templates. angular requesting resource server via url, , expects html fragment. if angular requesting rails, use rails functionality serve html fragment (ie template). write angular templates rails partial using erb or haml, rails serve html requester.

as side note, gets complicated separate concerns doing approach. keep clear in mind rails needs application server, , rails needs application service. application server needs serve angular application (i.e. js , html managed angular on client side). application service needs serve json consumed angular.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -