angularjs - Share the scope with angular ui router -


how can share scope angular ui router ? tried :

angular.module('myapp').controller('detailctrl', ['$scope',     function($scope) {  $scope.test=$scope.$parent.services;   angular   .module('myapp', ['nganimate', 'ngcookies', 'ngresource'                   , 'ui.router', 'ngsanitize', 'ngtouch'])   .config ($stateprovider) ->     $stateprovider.state('home',       url: "/"       templateurl: "home.html"     ).state('services',       url: "/services"       templateurl: "services.html"     ).state('services.detail',       url: "/detail/"       templateurl: "detail.html"     ) 

in servicesctrl :

$scope.services = getservices.query(); 


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -