Skip to content

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

@ciddan

Description

@ciddan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions