Closed paynoattn closed 8 years ago
Whoops, I forgot to import 'angular' in my app-config.js. I didn't think I needed it because I wasn't using any props of the angular object, but apparently you do.
fix is for app-config.js:
import 'angular';
AppConfig.$inject = ['$stateProvider', '$urlRouterProvider'];
export default function AppConfig($stateProvider, $urlRouterProvider) {
//define an app-wide abstract state for ui-router
$stateProvider.state('app', {
url: '/',
//controller: 'AppController as AppController',
templateUrl: appPartial
});
$urlRouterProvider.otherwise('/');
}
import appPartial from 'ngtemplate!html!./app.partial.html';
This is a great loader, I have a strange issue though. I got this to work fine, until I tried moving it to a ES6 modules.
It throws an error that it doesn't know what 'angular.module' is. Offending error is:
'Uncaught TypeError: Cannot read property 'module' of undefined'
from my bundle:'window.angular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }])'
app.js
app-config.js