This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
ng-repeat doesn't work if template is included by templateUrl #2151
Closed
Description
Hi everyone,
i can't tell if its a bug or a feature, but when i tried to outsource my directive templates into own files i stumbled across an strange behaviour.
If the template has a ng-repeat on its root element it works fine as long the template is inline in the directive. If i put the template in an own file and specify the url in the templateUrl, ng-repeat doesn't work.
The problem is that i need to have the ng-repeat in the root element.
I made a fiddle for demonstration: http://jsfiddle.net/eaNNf/11/
update:
I found a workaround for this problem:
Instead of: templateUrl: 'template.html'
i write: template: $templateCache.get('template.html')