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
Post a Comment