Open Mec-iS opened 10 years ago
I tried to use the resolve property with $routeProvider in routes.js:
resolve
$routeProvider
routes.js
$routeProvider.when('/url'', { templateUrl: '/static/app/partials/template.html', controller: 'Ctrl1', resolve: { getPromise: /* get a promise */ } });
In 'Ctrl1' definition, if I try to inject getPromise like
getPromise
...('Ctrl1', ['$scope' ... , function($scope, ..., getPromise){...}]);
browser says "getPromiseProvider error". Seems like the app goes to look for it only in services.js. Am I missing something about how the app modules/files get loaded?
services.js
I tried to use the
resolve
property with$routeProvider
inroutes.js
:In 'Ctrl1' definition, if I try to inject
getPromise
likebrowser says "getPromiseProvider error".
Seems like the app goes to look for it only in
services.js
.Am I missing something about how the app modules/files get loaded?