Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. .when('/projects/:id', {
  2. resolve: {
  3. project: function($routeParams, projects) {
  4. return projects[$routeParams.id - 1];
  5. }
  6. },
  7. // etc
  8.  
  9. resolve: {
  10. project: function($routeParams, projects) {
  11. return projects.find(project => project.id === $routeParams.id);
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement