Обмен данными $ Scope между государствами

Я пытаюсь получить доступ к родительскому состоянию от ребенка. Я пробовал это, но это не работает.

angular.module('myApp').controller('compareCtrl', ['$scope',
    function($scope) {
 $scope.test=$scope.$parent.services;

app.coffee

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/list.html"
    ).state('services.detail',
      url: "/detail/"
      templateUrl: "detail.html"
    ).state('services.compare',
      url: "/compare/"
      templateUrl: "compare.html"
    )

Ответы на вопрос(1)

Ваш ответ на вопрос