{"action":"created","issue":{"url":"https://api.github.com/repos/Dresel/RouteLocalization/issues/40","labels_url":"https://api.github.com/repos/Dresel/RouteLocalization/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/Dresel/RouteLocalization/issues/40/comments","events_url":"https://api.github.com/repos/Dresel/RouteLocalization/issues/40/events","html_url":"https://github.com/Dresel/RouteLocalization/issues/40","id":57914422,"number":40,"title":"How to use Angular with RouteLocalization","user":{"login":"mdmoura","id":372865,"avatar_url":"https://avatars.githubusercontent.com/u/372865?v=3","gravatar_id":"","url":"https://api.github.com/users/mdmoura","html_url":"https://github.com/mdmoura","followers_url":"https://api.github.com/users/mdmoura/followers","following_url":"https://api.github.com/users/mdmoura/following{/other_user}","gists_url":"https://api.github.com/users/mdmoura/gists{/gist_id}","starred_url":"https://api.github.com/users/mdmoura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdmoura/subscriptions","organizations_url":"https://api.github.com/users/mdmoura/orgs","repos_url":"https://api.github.com/users/mdmoura/repos","events_url":"https://api.github.com/users/mdmoura/events{/privacy}","received_events_url":"https://api.github.com/users/mdmoura/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-17T11:44:36Z","updated_at":"2015-02-17T11:50:21Z","closed_at":null,"body":"Hello,\r\n\r\nI have an ASP.NET MVC / Web API application where each page is a SPA using Angular.\r\n\r\nEach page can have multiple sections being each one a partial view as described here:\r\nhttp://www.wintellect.com/devcenter/dbaskin/angularjs-mvc-cookbook-simple-routing\r\n\r\nConsider the following route in Angular:\r\n\r\n        $routeProvider.when('/About', {\r\n            templateUrl: '/Home/About',\r\n            controller: 'aboutCtrl',\r\n        });\r\n\r\nLink \"/About\" loads calls MVC's \"/Home/About\" that returns a partial view where aboutCtrl is used.\r\n\r\nHowever RoutesLocalization changes routes depending on culture ... So this won't work ...\r\n\r\nMy idea would be a GlobalFilter that loads all Routes (MVC and API) into a dictionary:\r\n\r\n    Dictionary<String, String> routes = new Dictionary<String, String> {\r\n      { \"Route1Key\", \"/en/about\" },\r\n      { \"Route2Key\", \"en/contact\" }\r\n    };\r\n\r\nThen transform this in JSON and put it in a global variable using window.routes = ...\r\nThen in angular routing use the keys on that dictionary to define routes.\r\n\r\nOr instead of a filter I could simply this do on the master view ... Or ViewStart?\r\nCan I have the keys for those routes? Should I name every route?\r\n\r\nDid anyone ever used Angular with RouteLocalization in such a way?\r\n\r\nThank You,\r\nMiguel\r\n"},"comment":{"url":"https://api.github.com/repos/Dresel/RouteLocalization/issues/comments/74656263","html_url":"https://github.com/Dresel/RouteLocalization/issues/40#issuecomment-74656263","issue_url":"https://api.github.com/repos/Dresel/RouteLocalization/issues/40","id":74656263,"user":{"login":"Dresel","id":1769090,"avatar_url":"https://avatars.githubusercontent.com/u/1769090?v=3","gravatar_id":"","url":"https://api.github.com/users/Dresel","html_url":"https://github.com/Dresel","followers_url":"https://api.github.com/users/Dresel/followers","following_url":"https://api.github.com/users/Dresel/following{/other_user}","gists_url":"https://api.github.com/users/Dresel/gists{/gist_id}","starred_url":"https://api.github.com/users/Dresel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dresel/subscriptions","organizations_url":"https://api.github.com/users/Dresel/orgs","repos_url":"https://api.github.com/users/Dresel/repos","events_url":"https://api.github.com/users/Dresel/events{/privacy}","received_events_url":"https://api.github.com/users/Dresel/received_events","type":"User","site_admin":false},"created_at":"2015-02-17T11:50:21Z","updated_at":"2015-02-17T11:50:21Z","body":"Well you could set `AddCultureAsRoutePrefix` to false if you do not want the urls to be changed? Why not using T4MVC for setting the routes in templateUrl?"}}