I've been following along on a tutorial on egghead.io showing application architecture, and changing relevant sections to suit my application's requirements.
Please keep in mind I'm fairly new to Angular, so hopefully this will be an easy issue to spot.
I've set up several controllers and templates in a hierarchical fashion for my application. I'm using ui-router.
Here is my app.start.js definition and dependencies
angular.module('sb', [
'ui.router',
'angularLocalStorage',
'events',
'user'
]
I then go on to define my events.js controller and dependencies, along with the stateProvider
angular.module('events', [
'sb.models.events',
'events.show',
'events.list',
'events.edit',
'events.create'
])
.config(function($stateProvider) {
$stateProvider
.state('sb.events', {
url: '/',
views: {
'events@': {
controller: 'EventsCtrl as evm',
templateUrl: 'app/events/list/event-list.tmpl.html'
},
}
})
})
At this point, everything is working fine. However, when I try to navigate to url.com/#/events/create, I can see the template being retrieved in chrome developer tools, but it's not updating the actual visible template to show this.
This is my events-create.js
angular.module('events.create', [
])
.config(function($stateProvider) {
$stateProvider
.state('sb.events.create', {
url: 'events/create',
templateUrl: 'app/events/create/event-create.tmpl.html',
controller: 'EventsCreateCtrl as ecc',
})
})
and just to clarify, my main html template does have a ui-view="events"
Any pointers would be massively appreciated