Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .when('/videomail/:key', {
- templateUrl : 'view.html',
- controller : 'ViewCtrl',
- title : 'View',
- hideHeader : true,
- hideFooter : true,
- resolve: {
- videomail: function($rootScope, $route, Videomail) {
- return Videomail.get({key: $route.current.params.key}).$promise.then(function(videomail) {
- return videomail
- }, function(err) {
- // How can I present the error here?
- // Should I return it like 'return err' and let the controller deal with it?
- // Or can I forward this to another controller?
- // PS: It can be a 404 or a 401 error
- })
- }
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement