{"__v":0,"_id":"57ffd85f755a2e1700c2bb1b","category":{"version":"57ffd85f755a2e1700c2bb05","project":"567083021dabd80d00b122ae","_id":"57ffd85f755a2e1700c2bb07","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-18T23:07:56.909Z","from_sync":false,"order":1,"slug":"tutorial","title":"Tutorial"},"parentDoc":null,"project":"567083021dabd80d00b122ae","user":"567082433a32d20d00c45cab","version":{"__v":1,"_id":"57ffd85f755a2e1700c2bb05","project":"567083021dabd80d00b122ae","createdAt":"2016-10-13T18:54:23.018Z","releaseDate":"2016-10-13T18:54:23.018Z","categories":["57ffd85f755a2e1700c2bb06","57ffd85f755a2e1700c2bb07","57ffd85f755a2e1700c2bb08","57ffd85f755a2e1700c2bb09","57ffd85f755a2e1700c2bb0a","57ffd85f755a2e1700c2bb0b","57ffd85f755a2e1700c2bb0c","57ffd85f755a2e1700c2bb0d"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.4.0","version":"3.4"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-12-18T23:10:15.201Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"We still need to wire up our front end route.\n\nLet's open the `angular/RoutesConfig.js` file and add a new entry to the state provider. States are managed by [ui-router](https://github.com/angular-ui/ui-router/): a powerful routing library for Angular.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$stateProvider.state('app.create_post', {\\n\\t\\t\\t\\turl: '/create-post',\\n\\t\\t\\t\\tviews: {\\n\\t\\t\\t\\t\\t'main:::at:::': {\\n\\t\\t\\t\\t\\t\\ttemplateUrl: getView('create_post')\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t})\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\nNow you can go to this page by URL, or using `$state.go('app.create_post')` or manually in your browser by typing `/#/create-post`.\n\n> Prefer a screencast?\n[block:html]\n{\n  \"html\": \"<iframe width=\\\"560\\\" height=\\\"315\\\" src=\\\"https://www.youtube.com/embed/_ZWV9KBK2N8\\\" frameborder=\\\"0\\\" allowfullscreen></iframe>\"\n}\n[/block]","excerpt":"","slug":"front-end-routes","type":"basic","title":"Front-end routes"}
We still need to wire up our front end route. Let's open the `angular/RoutesConfig.js` file and add a new entry to the state provider. States are managed by [ui-router](https://github.com/angular-ui/ui-router/): a powerful routing library for Angular. [block:code] { "codes": [ { "code": "$stateProvider.state('app.create_post', {\n\t\t\t\turl: '/create-post',\n\t\t\t\tviews: {\n\t\t\t\t\t'main@': {\n\t\t\t\t\t\ttemplateUrl: getView('create_post')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})", "language": "javascript" } ] } [/block] Now you can go to this page by URL, or using `$state.go('app.create_post')` or manually in your browser by typing `/#/create-post`. > Prefer a screencast? [block:html] { "html": "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/_ZWV9KBK2N8\" frameborder=\"0\" allowfullscreen></iframe>" } [/block]