Reputation: 3752
I've searched the Ui-Router Controller Docs and read this here on stack overflow, along with other Google Searches. I'm trying to assign a controller to a state, but I get the the error:
Uncaught Typeerror: [$injector:modulerr]...controller cannot be found
I've borrowed a simpole Codepen to show a similar outcome to what I get in my code.
If I remove exampleCtrl from my state definition all works fine:
...
.state('tab1', {
name: 'tab1',
url: '/tab1',
template: '<div class="tab tab1"><p>Caerphilly</p></div>',
controller: exampleCtrl
})
...
Is this a matter of order? or am I missing something.
Upvotes: 0
Views: 53