Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

Use of resolve in Routing #32

Open
Mec-iS opened this issue Jun 25, 2014 · 0 comments
Open

Use of resolve in Routing #32

Mec-iS opened this issue Jun 25, 2014 · 0 comments
Labels

Comments

@Mec-iS
Copy link

Mec-iS commented Jun 25, 2014

I tried to use the resolve property with $routeProvider in 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

   ...('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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants