An angularjs module to easily handle errors between and on states
Bower:
bower install ui-router-errors
In your page, add:
<script src="bower_components/ui-router-errors/dist/ui-router-errors.min.js"></script>
Add the module as a dependency to your app:
var app = angular.module('app', ['ui-router-errors']
Simply add your error state like so:
var state = {
name: 'errors',
template: 'Error occured',
controller: ['$errors', function($errors){
var self = this;
angular.extend(self, $errors);
// Access get methods in your template
}]
}