Advertisement
Guest User

Untitled

a guest
Aug 21st, 2014
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. .when('/videomail/:key', {
  2. templateUrl : 'view.html',
  3. controller : 'ViewCtrl',
  4. title : 'View',
  5. hideHeader : true,
  6. hideFooter : true,
  7. resolve: {
  8. videomail: function($rootScope, $route, Videomail) {
  9. return Videomail.get({key: $route.current.params.key}).$promise.then(function(videomail) {
  10. return videomail
  11. }, function(err) {
  12. // How can I present the error here?
  13. // Should I return it like 'return err' and let the controller deal with it?
  14. // Or can I forward this to another controller?
  15. // PS: It can be a 404 or a 401 error
  16. })
  17. }
  18. }
  19. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement