'use strict';

(function() {
  var app = angular.module('pncui', [
    'ngResource',
    'ui.router',
    'pnc.Dashboard',
    'pnc.BuildConfig'
  ]);

  app.config(['$stateProvider', '$urlRouterProvider', '$locationProvider',
    function($stateProvider, $urlRouterProvider, $locationProvider) {

      $locationProvider.html5Mode(false).hashPrefix('!');

      $stateProvider.state('error', {
        url: '/error',
        templateUrl: 'error.html'
      });

      // Redirect any unmatched URLs to the error state.
      $urlRouterProvider.otherwise('/error');
    }
  ]);
})();

'use strict';

(function() {
  var app = angular.module('pncui', [
    'ngResource',
    'ui.router',
    'pnc.Dashboard',
    'pnc.BuildConfig'
  ]);

  app.config(['$stateProvider', '$urlRouterProvider', '$locationProvider',
    function($stateProvider, $urlRouterProvider, $locationProvider) {

      $locationProvider.html5Mode(false).hashPrefix('!');

      $stateProvider.state('error', {
        url: '/error',
        views: {
          'content@': {
            templateUrl: 'error.html'
          }
        }
      });

      // Redirect any unmatched URLs to the error state.
      $urlRouterProvider.otherwise('/error');
    }
  ]);
})();

Fix to correctly display resource not found message when navigating to a non-existent state.