I am using AngularJS and ui-router and in my app.js. I have the following line:
app.js
$urlRouterProvider.otherwise(\'/\');
However
I think you achieved that with this code
$urlRouterProvider.otherwise(function($injector, $location){ $injector.invoke(['$state', function($state) { $state.go('404'); }]); });