Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the line `xmlns:ng="http://angularjs.org"` works/needed

Recommended way of integrating angularjs into html looks like:

<!doctype html>
<html xmlns:ng="http://angularjs.org" ng-app>
  <body>
    ...
    <script src="angular.js">
  </body>
</html>

The question is: none of the textbooks uses xmlns:ng="http://angularjs.org" line. Where is that important or make sense? Should the line to be used with every module declaration?

like image 554
Super Babaca Avatar asked Oct 20 '22 23:10

Super Babaca


1 Answers

From the documentation:

If you choose to use the old style directive syntax ng: then include xml-namespace in html to make IE happy. (This is here for historical reasons, and we no longer recommend use of ng:.)

You can see more at https://docs.angularjs.org/guide/bootstrap

like image 99
Sanya Tobi Avatar answered Oct 27 '22 09:10

Sanya Tobi