Lazy load template and controller in angular UI-Router
问题 I am attempting to lazy load a controller and template in my UI-Router router.js file, but am having difficulty with the template. The controller loads properly, but after that is loaded, we must load the template and this is where things go wrong. After ocLazyLoad loads the controller, we resolve an Angular promise which is also included in the templateProvider. The issue is instead of returning the promise (templateDeferred.promise) after the file is done loading, the promise is returned as