angularjs - Why do my angular behave different depending on the browser? -
My angle page which I have reduced for one, I show the same IMG (only one red rectangle) -To have tried different methods in the "IMG" page:
- The first image to specify the file location uses the XML-style parameter "ng: src".
- Uses another image "Ng -" - Prefix style
- The third image uses only the src attribute (which I thought might probably not work well
Firefox is displayed in all three images.
In Opera The page only shows two images.
Chromium refuses to load the page too (it says, "Error: an invalid or invalid String was specified. "(This works if I remove XML-style img).
Why is this happening? Because I believe that in XML My priority XML-style parameter will be to work in all browsers. Note that I do not care about Internet Explorer.
Reset with my (broken) project:
XHTML Speak reported that Chrome When you do not prepare XML properly, you return the error, which is correct when the following steps are not followed in the algorithm:
If any reference Element, then the parser feed created just now that string related to the start tag of that element, all namespace prefixes which are within the scope of that element in the DOM, as well as declaring the default namespace (if any) Is in. / P>
The result of not following this step is that you have to set the
xmlns: ng to the original element of the piece that you are adding (or technical form) , Any element or guardian uses the
ng namespace)
Edit after further discussion in comments:
element on Opera .setAttribute does not if any attributes do not exist then do anything for Internet Explorer for this AngularJS. Enabling this fix for opera also solves the problem on opera. A bug has been released with AngularJS Internet Explorer and Opera misinterpret it.
Comments
Post a Comment