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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -