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

Use of resolve in Routing #32

Description

@Mec-iS

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions