{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/1776","labels_url":"https://api.github.com/repos/angular-ui/ui-router/issues/1776/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-router/issues/1776/comments","events_url":"https://api.github.com/repos/angular-ui/ui-router/issues/1776/events","html_url":"https://github.com/angular-ui/ui-router/issues/1776","id":58630998,"number":1776,"title":"Getting data from a service resolved in the parent to inherit down to it's child state","user":{"login":"bmwertman","id":2573903,"avatar_url":"https://avatars.githubusercontent.com/u/2573903?v=3","gravatar_id":"","url":"https://api.github.com/users/bmwertman","html_url":"https://github.com/bmwertman","followers_url":"https://api.github.com/users/bmwertman/followers","following_url":"https://api.github.com/users/bmwertman/following{/other_user}","gists_url":"https://api.github.com/users/bmwertman/gists{/gist_id}","starred_url":"https://api.github.com/users/bmwertman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmwertman/subscriptions","organizations_url":"https://api.github.com/users/bmwertman/orgs","repos_url":"https://api.github.com/users/bmwertman/repos","events_url":"https://api.github.com/users/bmwertman/events{/privacy}","received_events_url":"https://api.github.com/users/bmwertman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-23T18:56:01Z","updated_at":"2015-02-23T21:05:26Z","closed_at":null,"body":"I'm able to access data in my ManageCtrl that resolves in the app.manage state. But I need this to inherit down to my app.manage.hours state so I have access to it in my CalendarController. \r\n\r\nRight now if I try to pass shopService and shop into my Calendar Controller I get an unknown provider error on shop. If I don't pass in shop and reference it in the controller it says shop is undefined.\r\n\r\n\r\nApp.js\r\n\r\n    var app = angular.module('myApp', [])\r\n    .config(['$stateProvider', '$urlRouterProvider',  '$ionicConfigProvider', function ($stateProvider, $urlRouterProvider, $ionicConfigProvider) {\r\n        $stateProvider.state('app', {\r\n            url: \"/app\",\r\n            abstract: true,\r\n            templateUrl: \"menu/templates/menu.html\",\r\n            controller: 'AppCtrl'\r\n        });\r\n        $stateProvider.state('app.manage', {\r\n            url: \"/manage\",\r\n            views: {\r\n                'menuContent': {\r\n                    templateUrl: \"manage/templates/manage.html\",\r\n                    controller: 'ManageCtrl',\r\n                    resolve: {\r\n                       shop: function (shopService) {\r\n                       return shopService.getShop();\r\n                    }\r\n                 }\r\n              }\r\n           }\r\n        });\r\n        $stateProvider.state('app.manage.hours', {\r\n            url: \"/manage/hours\",\r\n            resolve: {\r\n                shop: function (shopService) {\r\n                    return shopService.getShop();\r\n                } \r\n            },\r\n            views: {\r\n                'hours': {\r\n                    templateUrl: \"lib/rcalendar/template/schedule.html\",\r\n                    controller: \"CalendarController\"\r\n                }\r\n            }\r\n        }); \r\n\r\nShop Service\r\n\r\n    app.factory('shopService', function () {\r\n      var service = {\r\n        _shop: null,\r\n        setShop: function (s) {\r\n          if (s && !s.error) {\r\n            service._shop = s;\r\n            return service.getShop();\r\n          } else {\r\n            return s.error;\r\n          }\r\n        },\r\n        getShop: function () {\r\n          return service._shop;\r\n        }\r\n      };\r\n      return service;\r\n    });\r\nManage Controller (Resolves here)\r\n\r\n    app.controller('ManageCtrl', function ($scope, 'shopService', 'shop',  function ($scope, shopService, shop) {\r\n         $scope.shop = shop;\r\n    }\r\n\r\nCalendar Controller (Doesn't inherit here)\r\n\r\n    Synchro.constant('calendarConfig', {\r\n      //some settable constants\r\n    })\r\n    app.controller('CalendarController', ['$scope', 'shopService', 'shop',  function ($scope, shopService, shop) {\r\n        $scope.shop = shop;\r\n    });"},"comment":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/comments/75631498","html_url":"https://github.com/angular-ui/ui-router/issues/1776#issuecomment-75631498","issue_url":"https://api.github.com/repos/angular-ui/ui-router/issues/1776","id":75631498,"user":{"login":"bmwertman","id":2573903,"avatar_url":"https://avatars.githubusercontent.com/u/2573903?v=3","gravatar_id":"","url":"https://api.github.com/users/bmwertman","html_url":"https://github.com/bmwertman","followers_url":"https://api.github.com/users/bmwertman/followers","following_url":"https://api.github.com/users/bmwertman/following{/other_user}","gists_url":"https://api.github.com/users/bmwertman/gists{/gist_id}","starred_url":"https://api.github.com/users/bmwertman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmwertman/subscriptions","organizations_url":"https://api.github.com/users/bmwertman/orgs","repos_url":"https://api.github.com/users/bmwertman/repos","events_url":"https://api.github.com/users/bmwertman/events{/privacy}","received_events_url":"https://api.github.com/users/bmwertman/received_events","type":"User","site_admin":false},"created_at":"2015-02-23T21:05:26Z","updated_at":"2015-02-23T21:05:26Z","body":"I'm seeing the same issues. I think this has something to do with the view names and/or as you mention the configuration of the resolve in the child view or removal thereof."}}