{"action":"opened","issue":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/2412","labels_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2412/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2412/comments","events_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2412/events","html_url":"https://github.com/angular-ui/ui-router/issues/2412","id":120420198,"number":2412,"title":"Typed routes configured before the custom type break the type","user":{"login":"gggritso","id":989898,"avatar_url":"https://avatars.githubusercontent.com/u/989898?v=3","gravatar_id":"","url":"https://api.github.com/users/gggritso","html_url":"https://github.com/gggritso","followers_url":"https://api.github.com/users/gggritso/followers","following_url":"https://api.github.com/users/gggritso/following{/other_user}","gists_url":"https://api.github.com/users/gggritso/gists{/gist_id}","starred_url":"https://api.github.com/users/gggritso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gggritso/subscriptions","organizations_url":"https://api.github.com/users/gggritso/orgs","repos_url":"https://api.github.com/users/gggritso/repos","events_url":"https://api.github.com/users/gggritso/events{/privacy}","received_events_url":"https://api.github.com/users/gggritso/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-04T15:11:11Z","updated_at":"2015-12-04T15:11:11Z","closed_at":null,"body":"Ran into an issue yesterday while trying to use `$urlMatcherFactoryProvider` to add a custom parameter type. I had two separate `config` blocks, one setting up the custom `type`, and one adding the actual routes. I discovered that if I tried to set up the routes before I declared the custom parameter type, the custom type wouldn't get declared correctly.\r\n\r\n[This Fiddle](https://jsfiddle.net/gs7g2hua/2/) shows the issue. The route doesn't resolve correctly. If you change the order, and configure the custom type before the routes, the route resolves."}}