javascript - state could not be resolved in angularjs -
i using nested view ui-router. menu html
<li ng-class="{active: $state.includes('staffs')}"> <a ui-sref="dashboard"><i class="fa fa-users"></i> <span class="nav-label">{{ 'staffs' | translate }}</span> <span class="fa arrow"></span></a> <ul class="nav nav-second-level collapse" ng-class="{in: $state.includes('staffs')}"> <li ui-sref-active="active"><a ui-sref="staffs.add"><i class="fa fa-circle-o"></i>{{ 'addstaff' | translate }}</a></li> <li ui-sref-active="active"><a ui-sref="staffs.view"><i class="fa fa-circle-o"></i>{{ 'viewstaffs' | translate }}</a></li> <li ui-sref-active="active"><a ui-sref="staffs.permission"><i class="fa fa-circle-o"></i>{{ 'staffpermission' | translate }}</a></li> <li ui-sref-active="active"><a ui-sref="staffs.prdtype"><i class="fa fa-circle-o"></i>{{ 'producttype' | translate }}</a></li> </ul> </li>
below config.js
.state('staffs.add', { abstract: true, url: "/add_staff", templateurl: "views/staff_add.php", })
i getting error error: not resolve 'staffs.add' state ''. can tell me doing wrong
you cannot go abstract
state, abstract
state can act container/parent state
remove abstract: true
, should work
i'm not sure how .php
files usable angular template
Comments
Post a Comment