Angular-UI-Router - getting content of dynamic template
问题 I am building an angular app using angular-ui-router. The backend has a REST api that gives me the url to a form based on a ticket id. In app.js, I want to dynamically set the template based on a query to this REST service. Example: $stateProvider .state('form', { url: '/form/:id', templateProvider: function ($resource, formResolver, $stateParams) { //formResolver calls the REST API with the form id and gets back a URL. return formResolver.resolve($stateParams.id).then(function(url) { return