I have a UI-Router document set up to show the "pages" sections of a demo.
(function() { 'use strict'; angular.module('pb.ds.pages').config(function($stateProvider) { $stateProvider.state('pages', { abstract: true, url: '/pages', templateUrl: 'modules/pages/templates/pages.html', controller: 'PagesController as pages', data: { pageTitle: 'Pages', access: 'public', bodyClass: 'pages' } }) .state('pages.signin', { url: '/signin', templateURL: 'modules/pages/templates/signin.html', controller: 'SignInController as signin' }) .state('pages.forgotpassword', { url: '/forgotpassword', templateURL: 'modules/pages/templates/forgotpassword.html', controller: 'ForgotPasswordController as forgot' }) .state('pages.404', { url: '/404', templateURL: 'modules/pages/templates/404.html', controller: '404Controller' }); }); })(); The parent state, "pages" has the ui-view on it, but otherwise I don't need to "show" it. I am only interested in showing its children, such as pages.signin or pages.forgotpassword.
Typing in the url "/forgotpassword" bounces me back to my homepage, which is the "otherwise" state in my app.module.js
// UI ROUTER CONFIG angular.module('app').config(function($stateProvider) { $stateProvider.state('otherwise', { url: '*path', template: '', controller: function($state) { $state.go('dashboard'); } }); }); No errors in console, and all the pages in question are linked in my index.html.
I'm sure I must have missed something obvious. Any clues?
UPDATE
If I enter /pages/forgotpassword it does go to the correct path but the view is not being populated by the template...