{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/4633","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/4633/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/4633/comments","events_url":"https://api.github.com/repos/angular/angular/issues/4633/events","html_url":"https://github.com/angular/angular/issues/4633","id":110681300,"number":4633,"title":"[ComponentRouter] templateUrl and lifecycle hook in Angular 1","user":{"login":"mediacad","id":6564301,"avatar_url":"https://avatars.githubusercontent.com/u/6564301?v=3","gravatar_id":"","url":"https://api.github.com/users/mediacad","html_url":"https://github.com/mediacad","followers_url":"https://api.github.com/users/mediacad/followers","following_url":"https://api.github.com/users/mediacad/following{/other_user}","gists_url":"https://api.github.com/users/mediacad/gists{/gist_id}","starred_url":"https://api.github.com/users/mediacad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mediacad/subscriptions","organizations_url":"https://api.github.com/users/mediacad/orgs","repos_url":"https://api.github.com/users/mediacad/repos","events_url":"https://api.github.com/users/mediacad/events{/privacy}","received_events_url":"https://api.github.com/users/mediacad/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular/labels/comp:%20router","name":"comp: router","color":"c7def8"},{"url":"https://api.github.com/repos/angular/angular/labels/effort2:%20medium%20(day)","name":"effort2: medium (day)","color":"bfe5bf"},{"url":"https://api.github.com/repos/angular/angular/labels/P2:%20required","name":"P2: required","color":"fad8c7"},{"url":"https://api.github.com/repos/angular/angular/labels/type:%20bug","name":"type: bug","color":"EEEEEE"}],"state":"open","locked":false,"assignee":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars.githubusercontent.com/u/15655?v=3","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"milestone":null,"comments":32,"created_at":"2015-10-09T15:27:01Z","updated_at":"2016-02-18T22:55:42Z","closed_at":null,"body":"In my application in Angular 1, when I use the property 'template' in the directive, $onActivate works fine. But when I use the property 'templateUrl', $onActivate doesn't work (but the template is displayed fine).\r\nExemple :\r\n```javascript\r\nangular\r\n      .module('test')\r\n      .directive('testComponent', ['$q',\r\n        function($q) {\r\n          return {\r\n            templateUrl: 'templatePath', // $onActivate DOESN'T WORK\r\n// OR\r\n            template: 'hello', // $onActivate WORKS\r\n            controllerAs: 'ctrl',\r\n            controller: [\r\n              '$q',\r\n              Test]\r\n          };\r\n        }]);\r\n\r\n  function Test($q) {\r\n    console.log('controller');\r\n  }\r\n  Test.prototype.$onActivate = function() {\r\n    console.log('$onActivate');\r\n  };\r\n```\r\n\r\nIs it a bug ?"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/185969772","html_url":"https://github.com/angular/angular/issues/4633#issuecomment-185969772","issue_url":"https://api.github.com/repos/angular/angular/issues/4633","id":185969772,"user":{"login":"KhoaSydney","id":3717031,"avatar_url":"https://avatars.githubusercontent.com/u/3717031?v=3","gravatar_id":"","url":"https://api.github.com/users/KhoaSydney","html_url":"https://github.com/KhoaSydney","followers_url":"https://api.github.com/users/KhoaSydney/followers","following_url":"https://api.github.com/users/KhoaSydney/following{/other_user}","gists_url":"https://api.github.com/users/KhoaSydney/gists{/gist_id}","starred_url":"https://api.github.com/users/KhoaSydney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KhoaSydney/subscriptions","organizations_url":"https://api.github.com/users/KhoaSydney/orgs","repos_url":"https://api.github.com/users/KhoaSydney/repos","events_url":"https://api.github.com/users/KhoaSydney/events{/privacy}","received_events_url":"https://api.github.com/users/KhoaSydney/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T22:55:42Z","updated_at":"2016-02-18T22:55:42Z","body":"@btford are you able to push the fix for isuee #6978  to npm ?"}}