{"action":"opened","issue":{"url":"https://api.github.com/repos/marcoslin/angularAMD/issues/154","labels_url":"https://api.github.com/repos/marcoslin/angularAMD/issues/154/labels{/name}","comments_url":"https://api.github.com/repos/marcoslin/angularAMD/issues/154/comments","events_url":"https://api.github.com/repos/marcoslin/angularAMD/issues/154/events","html_url":"https://github.com/marcoslin/angularAMD/issues/154","id":104269077,"number":154,"title":"Nested Views...","user":{"login":"mrmofo","id":270742,"avatar_url":"https://avatars.githubusercontent.com/u/270742?v=3","gravatar_id":"","url":"https://api.github.com/users/mrmofo","html_url":"https://github.com/mrmofo","followers_url":"https://api.github.com/users/mrmofo/followers","following_url":"https://api.github.com/users/mrmofo/following{/other_user}","gists_url":"https://api.github.com/users/mrmofo/gists{/gist_id}","starred_url":"https://api.github.com/users/mrmofo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrmofo/subscriptions","organizations_url":"https://api.github.com/users/mrmofo/orgs","repos_url":"https://api.github.com/users/mrmofo/repos","events_url":"https://api.github.com/users/mrmofo/events{/privacy}","received_events_url":"https://api.github.com/users/mrmofo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-01T13:41:28Z","updated_at":"2015-09-01T13:41:28Z","closed_at":null,"body":"Hello - thanks for this, it really seems to be the best option for when wanting to follow an AMD pattern for Angular. \r\n\r\nI am having an issue with some code that I've been trying to get to work for a couple days now and was wondering if I could get some direction?\r\n\r\n```javascript\r\n//Client States\r\n        $stateProvider.state('home',\r\n            angularAMD.route({\r\n                abstract: true,\r\n                url: '',\r\n                templateUrl: \"app/common/home.html\",\r\n                controller: \"HomeController\",\r\n                controllerUrl: 'app/common/homeController'\r\n            }))\r\n            .state('home.clientList',\r\n                angularAMD.route({\r\n                    url: \"/clients\",\r\n                    templateUrl: \"app/clients/clientList.html\",\r\n                    controller: 'ClientListController',\r\n                    controllerUrl: 'app/clients/clientListController'\r\n            }))\r\n            .state('home.client',{\r\n                url: '/client/:clientID',\r\n                    views: {\r\n                        '': angularAMD.route({\r\n                            templateUrl: 'app/client/clientShell.html',\r\n                            controller: 'ClientShellController',\r\n                            controllerUrl: 'app/client/clientShellController'\r\n                        }),\r\n                        'clientHeader@home.client': angularAMD.route({\r\n                            templateUrl: 'app/client/client.html',\r\n                            controller: 'ClientController',\r\n                            controllerUrl: 'app/client/clientController'\r\n                        }),\r\n                        'courseList@home.client': angularAMD.route({\r\n                            templateUrl: 'app/clients/clientList.html',\r\n                            controller: 'ClientListController',\r\n                            controllerUrl: 'app/clients/clientListController'\r\n                        })\r\n                    }\r\n            });\r\n```\r\n\r\nThe View is simple:\r\n```html\r\n<div ui-view=\"clientHeader\"></div>\r\n<div ui-view=\"courseList\"></div>\r\n```\r\n\r\nBased on reading issue #9 I added the angularAMD.route to the lowest level - but, it just isn't working - the 'clientShellController' js file doesn't load and I get a null ref error.\r\n\r\nhome.clientList state works just fine from the above example but when I navigate to 'home.client' I get the following error:\r\n\r\n```\r\nError: [ng:areq] Argument 'ClientShellController' is not a function, got undefined\r\nhttp://errors.angularjs.org/1.4.4/ng/areq?p0=ClientShellController&p1=not%20aNaNunction%2C%20got%20undefined\r\n    at http://localhost:18435/Scripts/angular.js:68:12\r\n    at assertArg (http://localhost:18435/Scripts/angular.js:1795:11)\r\n    at assertArgFn (http://localhost:18435/Scripts/angular.js:1805:3)\r\n    at http://localhost:18435/Scripts/angular.js:9069:9\r\n    at chrome-extension://ighdmehidhipcmcojjgiloacoafjmpfk/dist/hint.js:1544:22\r\n    at http://localhost:18435/Scripts/angular-ui-router.js:4018:28\r\n    at invokeLinkFn (http://localhost:18435/Scripts/angular.js:8746:9)\r\n    at nodeLinkFn (http://localhost:18435/Scripts/angular.js:8246:11)\r\n    at compositeLinkFn (http://localhost:18435/Scripts/angular.js:7637:13)\r\n    at publicLinkFn (http://localhost:18435/Scripts/angular.js:7512:30)(anonymous function) @ angular.js:12416(anonymous function) @ angular.js:9203invokeLinkFn @ angular.js:8748nodeLinkFn @ angular.js:8246compositeLinkFn @ angular.js:7637publicLinkFn @ angular.js:7512updateView @ angular-ui-router.js:3959(anonymous function) @ angular-ui-router.js:3921Scope.$broadcast @ angular.js:16238$state.transition.resolved.then.$state.transition @ angular-ui-router.js:3311processQueue @ angular.js:14634(anonymous function) @ angular.js:14650Scope.$eval @ angular.js:15916Scope.$digest @ angular.js:15727scopePrototype.$digest @ hint.js:1924Scope.$apply @ angular.js:16024scopePrototype.$apply @ hint.js:1987done @ angular.js:10511completeRequest @ angular.js:10683requestLoaded @ angular.js:10624\r\n```\r\n\r\nWhen I look at the network traffic - the js file was never attempted to be pulled, so I know it isn't a naming, location, or reference problem. \r\n\r\nIf you have an advise or know why this might be happening - any help would be fantastic! \r\n\r\nThank You!\r\nMike "}}