{"action":"opened","issue":{"url":"https://api.github.com/repos/searls/jasmine-rails/issues/205","repository_url":"https://api.github.com/repos/searls/jasmine-rails","labels_url":"https://api.github.com/repos/searls/jasmine-rails/issues/205/labels{/name}","comments_url":"https://api.github.com/repos/searls/jasmine-rails/issues/205/comments","events_url":"https://api.github.com/repos/searls/jasmine-rails/issues/205/events","html_url":"https://github.com/searls/jasmine-rails/issues/205","id":181915020,"number":205,"title":"$templateCache not being hit","user":{"login":"rrrkren","id":8688167,"avatar_url":"https://avatars.githubusercontent.com/u/8688167?v=3","gravatar_id":"","url":"https://api.github.com/users/rrrkren","html_url":"https://github.com/rrrkren","followers_url":"https://api.github.com/users/rrrkren/followers","following_url":"https://api.github.com/users/rrrkren/following{/other_user}","gists_url":"https://api.github.com/users/rrrkren/gists{/gist_id}","starred_url":"https://api.github.com/users/rrrkren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rrrkren/subscriptions","organizations_url":"https://api.github.com/users/rrrkren/orgs","repos_url":"https://api.github.com/users/rrrkren/repos","events_url":"https://api.github.com/users/rrrkren/events{/privacy}","received_events_url":"https://api.github.com/users/rrrkren/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-09T22:05:28Z","updated_at":"2016-10-09T22:05:28Z","closed_at":null,"body":"I'm using the following code to test my directive (with external template):\r\n\r\n```javascript\r\napp.directive('test-element',function(){\r\n    return {\r\n        templateUrl: '/statics/template.html'\r\n        restrict: 'E'\r\n    }\r\n});\r\n\r\n//test\r\nvar $compile,scope;\r\nbeforeEach(function(){\r\n    module('app');\r\n    inject(function(_$compile_,_$rootScope_,$templateCache){\r\n        $compile = _$compile_;\r\n        scope = _$rootScope.$new();\r\n        $templateCache.put(\"/statics/template.html\",\"<h1>test</h1>\");\r\n    }));\r\n\r\nit ('works',function(){\r\n    var element = $compile('<test-element></test-element>')(scope)\r\n    scope.$digest();\r\n    console.log(element);\r\n    pending();\r\n}\r\n```\r\n\r\nThe element is not being compiled, and shown as `<test-element class='ng-scope'></test-element>`.\r\n\r\nI've put a console.log on angular's templateCache source code, and it seems that the put is run properly but get is never used. \r\n\r\nCan anyone point me to a correct direction? Thanks!"}}
{"actor":{"display_login":"rrrkren"}}