Advertisement
Guest User

Untitled

a guest
Apr 20th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.       .state('product', {
  2.         url : '/product',
  3.         abstract : true,
  4.         template : '<ui-view/>'
  5.       })
  6.       .state('product.details', {
  7.         url : '/{id}',
  8.         templateUrl : '/views/pages/product.html',
  9.         controller: 'productCtrl',
  10.         resolve: {
  11.           data: function ($stateParams, soApi) {
  12.             return soApi.getProduct({
  13.               'id': $stateParams.id
  14.             }).then(function(response) {
  15.               return response;
  16.             });
  17.           }
  18.         },
  19.         meta: {
  20.           'title': data.product.name
  21.         }
  22.       })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement