I am using AngularJS and ui-router and in my app.js. I have the following line:
app.js
$urlRouterProvider.otherwise(\'/\');
However
Try This.
$urlRouterProvider.otherwise(function($injector, $location){ $injector.get('$state').go('404'); });