{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/bootstrap/issues/5021","labels_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/5021/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/5021/comments","events_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/5021/events","html_url":"https://github.com/angular-ui/bootstrap/issues/5021","id":120676584,"number":5021,"title":"Custom template location and custom methods","user":{"login":"dashawk","id":1437205,"avatar_url":"https://avatars.githubusercontent.com/u/1437205?v=3","gravatar_id":"","url":"https://api.github.com/users/dashawk","html_url":"https://github.com/dashawk","followers_url":"https://api.github.com/users/dashawk/followers","following_url":"https://api.github.com/users/dashawk/following{/other_user}","gists_url":"https://api.github.com/users/dashawk/gists{/gist_id}","starred_url":"https://api.github.com/users/dashawk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dashawk/subscriptions","organizations_url":"https://api.github.com/users/dashawk/orgs","repos_url":"https://api.github.com/users/dashawk/repos","events_url":"https://api.github.com/users/dashawk/events{/privacy}","received_events_url":"https://api.github.com/users/dashawk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-07T00:22:47Z","updated_at":"2015-12-07T02:42:23Z","closed_at":"2015-12-07T02:42:23Z","body":"Hi all,\r\n\r\nI've read most of the template issues here and found the solution for the custom template locations by just adding this attribute `template-url=\"{{ templateLocation }}\"` to the element.\r\n\r\nBut one problem that I've encountered is when I am using a custom method for that template, it gives me an error.\r\n\r\nHere is an example for the timepicker directive:\r\n![timepicker layout](https://cloud.githubusercontent.com/assets/1437205/11616641/4f02d8a0-9cbb-11e5-97fe-f83e3445f623.jpg)\r\n![timepicker dropdown layout](https://cloud.githubusercontent.com/assets/1437205/11616642/5ba4dbc6-9cbb-11e5-833c-aa6c89c4ec02.jpg)\r\n\r\nThis is my custom layout for the timepicker. I manage to get this working.\r\n\r\nThe only BUT here is that the methods I use in the template like the click event, $watch, etc, I coded it directly in the tpls.min file which is not a good idea.\r\n\r\nHow can we add custom methods that can be used in the custom templates?"},"comment":{"url":"https://api.github.com/repos/angular-ui/bootstrap/issues/comments/162393847","html_url":"https://github.com/angular-ui/bootstrap/issues/5021#issuecomment-162393847","issue_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/5021","id":162393847,"user":{"login":"wesleycho","id":1703387,"avatar_url":"https://avatars.githubusercontent.com/u/1703387?v=3","gravatar_id":"","url":"https://api.github.com/users/wesleycho","html_url":"https://github.com/wesleycho","followers_url":"https://api.github.com/users/wesleycho/followers","following_url":"https://api.github.com/users/wesleycho/following{/other_user}","gists_url":"https://api.github.com/users/wesleycho/gists{/gist_id}","starred_url":"https://api.github.com/users/wesleycho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wesleycho/subscriptions","organizations_url":"https://api.github.com/users/wesleycho/orgs","repos_url":"https://api.github.com/users/wesleycho/repos","events_url":"https://api.github.com/users/wesleycho/events{/privacy}","received_events_url":"https://api.github.com/users/wesleycho/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T02:42:23Z","updated_at":"2015-12-07T02:42:23Z","body":"Perhaps making your own custom directives that are used in the template - this request is somewhat too vague for me to recommend a better course of action. This is a question not quite suited for GitHub issues though."}}