When it comes to compatible IE7 IE8 browsers, Angularjs has made it clear that the v1.3 version (including v1.3) will not support IE7 IE8, so if you want to be compatible with IE7 IE8 You must use the following version of v1.3
The previous article on the recursive play, but IE7 IE8 is not play, the principle of my simple explanation,
Angularjs in the loading of a template, will parse the content, the content into element (elements or nodes), here is the problem, in ie9+, chrome these browsers, will <script> This tag is also treated as an element, but not in IE7 IE8, so when the template is loaded, Angularjs does not put the script content in the $templatecache cache, and Ng-include is actually in the $ Templatecache the template in the cache, so ng-include does not take the contents of the script, resulting in IE7 IE8 does not show the results we want
Workaround:
Now that the problem is known, we just need to insert a recursive code into $templatecache before Ng-include gets $templatecache's script, which solves the
$templateCache There are two ways we can use, get and put,
$templateCache. Get (Key)
$templateCache. Put (key, value)
We can call the $templatecache.put method in the controller, the original script ID as the contents of the key,script inside as value, passed to $templatecache that can be realized the original recursive function
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
ANGULARJS Advanced Gameplay Create a recursive template compatible with IE browser