Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

controllerProvider on Ng1ViewDeclaration should be of type IInjectable instead of Function #3044

Closed
ciddan opened this issue Sep 27, 2016 · 1 comment
Milestone

Comments

@ciddan
Copy link
Contributor

ciddan commented Sep 27, 2016

I would expect this state definition to still be valid:

.state("product.store.live", {
    url: "/live"
    views: {
        "storeView@product": {
            controllerProvider: ["options", storeControllerProvider], // <--- compilation fail
            templateUrl: "app/components/product/detail/shared/StoreView.html"
        }
    }
})

Looking at the code in ng1/statebuilders/views.ts#getController the code looks for an ng1 array-notation-style array/function.

@christopherthielen christopherthielen added this to the 1.0.0-final milestone Sep 27, 2016
@christopherthielen
Copy link
Contributor

yep, thanks for the report!

ciddan added a commit to ciddan/ui-router that referenced this issue Oct 1, 2016
Closes angular-ui#3044. Changes the type of controllerProvider in Ng1ViewDeclaration to IInjectable. Adds 1 test for controller provider in ng1/stateSpec. Updates the controller handling test in ng1/viewSpec to verify that controllerProvider is IInjectable .
christopherthielen pushed a commit that referenced this issue Oct 1, 2016
Closes #3044. Changes the type of controllerProvider in Ng1ViewDeclaration to IInjectable. Adds 1 test for controller provider in ng1/stateSpec. Updates the controller handling test in ng1/viewSpec to verify that controllerProvider is IInjectable .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants