{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/2430","labels_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2430/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2430/comments","events_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2430/events","html_url":"https://github.com/angular-ui/ui-router/issues/2430","id":122927602,"number":2430,"title":"Dynamic TemplateUrl function written in array form is not working","user":{"login":"InfinityOne","id":5902211,"avatar_url":"https://avatars.githubusercontent.com/u/5902211?v=3","gravatar_id":"","url":"https://api.github.com/users/InfinityOne","html_url":"https://github.com/InfinityOne","followers_url":"https://api.github.com/users/InfinityOne/followers","following_url":"https://api.github.com/users/InfinityOne/following{/other_user}","gists_url":"https://api.github.com/users/InfinityOne/gists{/gist_id}","starred_url":"https://api.github.com/users/InfinityOne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/InfinityOne/subscriptions","organizations_url":"https://api.github.com/users/InfinityOne/orgs","repos_url":"https://api.github.com/users/InfinityOne/repos","events_url":"https://api.github.com/users/InfinityOne/events{/privacy}","received_events_url":"https://api.github.com/users/InfinityOne/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular-ui/ui-router/labels/bug","name":"bug","color":"eb6420"},{"url":"https://api.github.com/repos/angular-ui/ui-router/labels/PR-Welcome","name":"PR-Welcome","color":"006b75"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular-ui/ui-router/milestones/12","html_url":"https://github.com/angular-ui/ui-router/milestones/0.2.16","labels_url":"https://api.github.com/repos/angular-ui/ui-router/milestones/12/labels","id":1116814,"number":12,"title":"0.2.16","description":"Schedule a release to catch up any bugs fixes in the 0.2.x series","creator":{"login":"christopherthielen","id":2053478,"avatar_url":"https://avatars.githubusercontent.com/u/2053478?v=3","gravatar_id":"","url":"https://api.github.com/users/christopherthielen","html_url":"https://github.com/christopherthielen","followers_url":"https://api.github.com/users/christopherthielen/followers","following_url":"https://api.github.com/users/christopherthielen/following{/other_user}","gists_url":"https://api.github.com/users/christopherthielen/gists{/gist_id}","starred_url":"https://api.github.com/users/christopherthielen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christopherthielen/subscriptions","organizations_url":"https://api.github.com/users/christopherthielen/orgs","repos_url":"https://api.github.com/users/christopherthielen/repos","events_url":"https://api.github.com/users/christopherthielen/events{/privacy}","received_events_url":"https://api.github.com/users/christopherthielen/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":26,"state":"open","created_at":"2015-05-19T01:17:06Z","updated_at":"2016-01-23T06:44:30Z","due_on":"2015-07-01T05:00:00Z","closed_at":null},"comments":1,"created_at":"2015-12-18T10:58:23Z","updated_at":"2016-01-23T06:44:30Z","closed_at":"2016-01-23T06:44:30Z","body":"So i have \r\n\r\n```javascript\r\n$stateProvider.\r\n    //...many states...\r\n  state('help', {\r\n    url: '/help{params:.*}',\r\n    templateUrl: ['$stateParams', function($stateParams) {\r\n      return '/site/getHelpTemplate/name' + $stateParams.params;\r\n    }],\r\n    /*templateUrl: function($stateParams) {\r\n      return '/site/getHelpTemplate/name' + $stateParams.params;\r\n    },*/\r\n    controller: 'HelpCtrl',\r\n  });\r\n```\r\n\r\nif I write it in default form (commented), it works perfectly, but I'm minifying my code, so I need the array form, but it's not working, this is what I get\r\n\r\n```\r\nhttp://local/$stateParams,function%20($stateParams)%20%7B%20%20%20%20%20%20return%20'/site/getHelpTemplate/name'%20+%20$stateParams.params;%20%20%20%20%7D\r\n```\r\n\r\ninstead of\r\n\r\n```\r\nhttp://local/site/getHelpTemplate/name/someParam\r\n```\r\n\r\nNot a big master in Angular, but I guess it's not evaluating something, or did I miss something?\r\nI'm using AngularJS v1.4.7 & ui-router v0.2.15\r\n\r\n**update**\r\nI have found [this](http://stackoverflow.com/questions/29999499/ui-router-minification-of-templateurl) answer on stackoverflow, which works"},"comment":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/comments/174154409","html_url":"https://github.com/angular-ui/ui-router/issues/2430#issuecomment-174154409","issue_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2430","id":174154409,"user":{"login":"christopherthielen","id":2053478,"avatar_url":"https://avatars.githubusercontent.com/u/2053478?v=3","gravatar_id":"","url":"https://api.github.com/users/christopherthielen","html_url":"https://github.com/christopherthielen","followers_url":"https://api.github.com/users/christopherthielen/followers","following_url":"https://api.github.com/users/christopherthielen/following{/other_user}","gists_url":"https://api.github.com/users/christopherthielen/gists{/gist_id}","starred_url":"https://api.github.com/users/christopherthielen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christopherthielen/subscriptions","organizations_url":"https://api.github.com/users/christopherthielen/orgs","repos_url":"https://api.github.com/users/christopherthielen/repos","events_url":"https://api.github.com/users/christopherthielen/events{/privacy}","received_events_url":"https://api.github.com/users/christopherthielen/received_events","type":"User","site_admin":false},"created_at":"2016-01-23T06:44:30Z","updated_at":"2016-01-23T06:44:30Z","body":"`templateUrl` is not an injected function.  It is always called with a single parameter: the `toParams`.  There is no need to annotate it or use array notation."}}