{"action":"created","issue":{"url":"https://api.github.com/repos/johnpapa/angular-styleguide/issues/367","labels_url":"https://api.github.com/repos/johnpapa/angular-styleguide/issues/367/labels{/name}","comments_url":"https://api.github.com/repos/johnpapa/angular-styleguide/issues/367/comments","events_url":"https://api.github.com/repos/johnpapa/angular-styleguide/issues/367/events","html_url":"https://github.com/johnpapa/angular-styleguide/issues/367","id":67529077,"number":367,"title":"[Y270] Use of UI-router with the styleguide","user":{"login":"Cinetik","id":6072363,"avatar_url":"https://avatars.githubusercontent.com/u/6072363?v=3","gravatar_id":"","url":"https://api.github.com/users/Cinetik","html_url":"https://github.com/Cinetik","followers_url":"https://api.github.com/users/Cinetik/followers","following_url":"https://api.github.com/users/Cinetik/following{/other_user}","gists_url":"https://api.github.com/users/Cinetik/gists{/gist_id}","starred_url":"https://api.github.com/users/Cinetik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cinetik/subscriptions","organizations_url":"https://api.github.com/users/Cinetik/orgs","repos_url":"https://api.github.com/users/Cinetik/repos","events_url":"https://api.github.com/users/Cinetik/events{/privacy}","received_events_url":"https://api.github.com/users/Cinetik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-10T07:11:32Z","updated_at":"2015-04-10T11:56:52Z","closed_at":null,"body":"I've encounter a bit of misunderstanding  while using the UI-router.\r\nHere's a sample app:\r\n```\r\napp/\r\n      app.module.js\r\n      app.route.js\r\n      state1.html\r\n      state2.html\r\n      state1.list.html\r\n      state2.list.html\r\n```\r\napp.module.js:\r\n```javascript\r\n(function() {\r\n    'use strict';\r\n\r\n    angular.module(\r\n            'sample', [\r\n                'ui.router'\r\n            ]);\r\n})();\r\n```\r\napp.route.js : \r\n```javascript\r\n(function() {\r\n    'use strict';\r\n\r\n    angular\r\n        .module('sample')\r\n        .config(config);\r\n\r\n    config.$inject = ['$stateProvider', '$urlRouterProvider'];\r\n\r\n    function config($stateProvider, $urlRouterProvider) {\r\n        //\r\n        // For any unmatched url, redirect to /state1\r\n        $urlRouterProvider.otherwise(\"/state1\");\r\n        //\r\n        // Now set up the states\r\n        $stateProvider\r\n            .state('state1', {\r\n                url: \"/state1\",\r\n                templateUrl: \"state1.html\"\r\n            })\r\n            .state('state1.list', {\r\n                url: \"/list\",\r\n                templateUrl: \"state1.list.html\",\r\n                controller: function($scope) {\r\n                    $scope.items = [\"A\", \"List\", \"Of\", \"Items\"];\r\n                }\r\n            })\r\n            .state('state2', {\r\n                url: \"/state2\",\r\n                templateUrl: \"state2.html\"\r\n            })\r\n            .state('state2.list', {\r\n                url: \"/list\",\r\n                templateUrl: \"state2.list.html\",\r\n                controller: function($scope) {\r\n                    $scope.things = [\"A\", \"Set\", \"Of\", \"Things\"];\r\n                }\r\n\r\n            });\r\n    }\r\n\r\n})();\r\n\r\n```\r\n\r\nThis simple doesn't work. I get a Could not resolve '...' from state ''.\r\nHowever when I put my config in the same file as module, it works.\r\n\r\nI can't figure out what's wrong. And I really want to separate my state routes in another file."},"comment":{"url":"https://api.github.com/repos/johnpapa/angular-styleguide/issues/comments/91531916","html_url":"https://github.com/johnpapa/angular-styleguide/issues/367#issuecomment-91531916","issue_url":"https://api.github.com/repos/johnpapa/angular-styleguide/issues/367","id":91531916,"user":{"login":"johnpapa","id":1202528,"avatar_url":"https://avatars.githubusercontent.com/u/1202528?v=3","gravatar_id":"","url":"https://api.github.com/users/johnpapa","html_url":"https://github.com/johnpapa","followers_url":"https://api.github.com/users/johnpapa/followers","following_url":"https://api.github.com/users/johnpapa/following{/other_user}","gists_url":"https://api.github.com/users/johnpapa/gists{/gist_id}","starred_url":"https://api.github.com/users/johnpapa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnpapa/subscriptions","organizations_url":"https://api.github.com/users/johnpapa/orgs","repos_url":"https://api.github.com/users/johnpapa/repos","events_url":"https://api.github.com/users/johnpapa/events{/privacy}","received_events_url":"https://api.github.com/users/johnpapa/received_events","type":"User","site_admin":false},"created_at":"2015-04-10T11:56:51Z","updated_at":"2015-04-10T11:56:51Z","body":"I just update https://github.com/johnpapa/angular-styleguide#style-y270 with a code sample"}}