angular-ui / ui-router

The de-facto solution to flexible routing with nested views in AngularJS
http://ui-router.github.io/
MIT License
13.56k stars 3.01k forks source link

property controllerAs is not inherited by child state #3716

Closed qbunia closed 4 years ago

qbunia commented 6 years ago

This is a (check one box):

My version of UI-Router is: 1.0.7

Bug Report

"An abstract state can never be directly activated. Use an abstract state to provide inherited properties (url, resolve, data, etc) to children states." Property controllerAs is not inherited by child state.


$stateProvider.state("master",
{
    templateUrl: "Views/Shared/Application.html",
    controller: () => {},
    controllerAs: "c",
    abstract: true
});
$stateProvider.state("patients",
    {
        url: "/patients",
        templateUrl: Views.Patient.PatientsComponent.ViewUrl(),
        controller: Views.Patient.PatientsComponent,
        parent: "master"
});
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

This does not mean that the issue is invalid. Valid issues may be reopened.

Thank you for your contributions.