ui-router.stateHelper
ui-router.stateHelper copied to clipboard
Uncaught Error
this is my code:
stateHelperProvider
.state({
name: 'assets',
url: '/assets',
templateUrl: 'app/assets/assets.html',
children: [
{
name: 'monitoring',
url: '/monitoring',
templateUrl: 'app/assets/assetsMonitoring/assetsMonitoring.html',
controller: 'assetsMonitoringCtrl',
controllerAs: 'vm'
},
{
name: 'report',
url: '/report?{view:string}',
templateUrl: 'app/assets/assetsReport/assetsReport.html',
controller: 'assetsReportCtrl',
controllerAs: 'vm',
params: { view: { dynamic: true } }
},
{
name: 'manager',
url: '/manager',
templateUrl: 'app/assets/assetsManager/assetsManager.html',
controller: 'assetsManagerCtrl',
controllerAs: 'vm'
}
]
});
and this is what angular says:
Failed to instantiate module app due to: Error: States that specify the 'parent:' property should not have a '.' in their name (assets.monitoring)
I resolved the problem using { keepOriginalNames: true }
, but I have to use "manager" instead of "assets.manager" in ui-sref tag and it's causing me problems with other states that has the same child name, which is the case of "manager" state.
What do I do?
Did you solve this?
No, I gave up and stopped using it
I have found what the problem is.
In this block (line 43), add delete state.parent
;
if (!options.keepOriginalNames) {
fixStateName(state);
delete state.parent;
}
@davidzwa Well, that's up to @marklagendijk, the repo owner :)