Skip to content

Instantly share code, notes, and snippets.

@estevanjantsk
Created June 24, 2016 19:46
Show Gist options
  • Save estevanjantsk/f527aede1e4eb57e420731aefb6c7ca8 to your computer and use it in GitHub Desktop.
Save estevanjantsk/f527aede1e4eb57e420731aefb6c7ca8 to your computer and use it in GitHub Desktop.
$stateProvider
.state('angular',
url: '/'
controller: 'GeneralController'
views:
'sidebar':
templateUrl: 'sidebar.html'
controller: 'SidebarController'
'header':
templateUrl: 'header/header.html'
).
state('angular.courses',
name: 'courses'
url: 'courses/'
views:
'content@':
templateUrl: 'student/courses/index.html'
controller: 'Student.CoursesController'
resolve:
subscriptions: ['SubscriptionsPathTo', (SubscriptionsPathTo) ->
SubscriptionsPathTo.query()
]
category_subscriptions: ['CategorySubscriptionPathTo', (CategorySubscriptionPathTo) ->
CategorySubscriptionPathTo.query()
]
).
state('angular.courses.course',
url: ':id/'
views:
'content@':
templateUrl: 'student/courses/index.html'
controller: 'Student.CoursesController'
resolve:
subscriptions: ['SubscriptionsPathTo', (SubscriptionsPathTo) ->
SubscriptionsPathTo.query()
]
category_subscriptions: ['CategorySubscriptionPathTo', (CategorySubscriptionPathTo) ->
CategorySubscriptionPathTo.query()
]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment