I am trying to have nested states in UI-Router. But with no luck. I keep getting the following error.
Uncaught Error: [$injector:modulerr] Failed to instantiate module AdminPortal due to:
Error: Cannot combine: component|bindings|componentProvider with: templateProvider|templateUrl|template|notify|async|controller|controllerProvider|controllerAs|resolveAs in stateview: '[email protected]'
This is my route, when I go to the :
$stateProvider
.state('auth.portal', {
templateUrl: '/admin/dist/templates/portal.tpl.html'
})
.state('auth.portal.dashboard', {
url: '/dashboard',
component: 'dashboardComponent',
templateUrl: '/admin/dist/templates/dashboard.tpl.html'
});
portal.tpl.html
<h1>Portal</h1>
<ui-view></ui-view>
Basicaly I want to load portal.tpl.html and use the ui-view in that document for the dashboard.tpl.html.
I already checked out the GitHub Docs, this Plunkr and some other questions on Stack Overflow, but still not working.
templateUrlproperty from state definition which makes more sense to me.. as component will take care of URL