Docs
Docs

Front-end routes

We still need to wire up our front end route.

Let's open the angular/RoutesConfig.js file and add a new entry to the state provider. States are managed by ui-router: a powerful routing library for Angular.

$stateProvider.state('app.create_post', { url: '/create-post', views: { 'main@': { templateUrl: getView('create_post') } } })

Now you can go to this page by URL, or using $state.go('app.create_post') or manually in your browser by typing /#/create-post.

Prefer a screencast?


Did this page help you?