This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Description
I just had the followin experience:
I have created an element directive like this:
(function () {
'use strict';
angular
.module('myDirective', [])
.directive('myDirective', function () {
return {
restrict: 'E',
templateUrl: '/templates/my-directive',
};
});
})();
And I misped the temlateUrl. There should be .html at the end off course.
The strange thing that happened was that my whole application was loaded ad many times as this directive was used
I off course had WARNING: Tried to load angular more than once. and Uncaught Error: [ng:btstrpd] App Already Bootstrapped with this Element '<html class="ng-scope" lang="en-US" dir="ltr">' but I don't find this particular behaviour very intuitive. There might have been a better solution for handling nonexistent templates. Or at least I'd expect for angular NOT to load the app again.
Environment details:
angular 1.3.11
templateCache is on