angular.js-ie8-builds icon indicating copy to clipboard operation
angular.js-ie8-builds copied to clipboard

colon normalization of element directives for v1.4.7

Open Kidlike opened this issue 8 years ago • 2 comments

Hi. Thanks a lot for your effort !

I am evaluating the 1.4.7 build for our project and I came across this issue.

If you have an element directive named 'myDirective', you cannot use it from html with "my:directive". The other normalized names work: "my-directive", and "my_directive".

Doc reference: https://code.angularjs.org/1.4.7/docs/guide/directive#normalization

PS: I came across another issue as well, but I will investigate it separately. It's probably a documentation issue for you. It seems that the "jQuery 1.x" is not enough. We were using 1.7.x and it wasn't working. I then only tried with the version you have in your example (1.11.1) and it works fine.

Kidlike avatar Feb 02 '16 16:02 Kidlike

As far as I remember the colon syntax never work well with IE for any version of angular. https://code.angularjs.org/1.2.29/docs/guide/ie

I'll update readme to suggest using latest v1 jQuery.

fergaldoyle avatar Feb 04 '16 21:02 fergaldoyle

It does. Quote from the docs:

If the tag name starts with my: prefix then it is considered an XML namespace and must have corresponding namespace declaration on <html xmlns:my="ignored">

Which is what we had done, and it's working fine. Otherwise you'd have to add a document.createElement('my-element'); for every element directive... Which is a worse option in my opinion. The xmlns ignore approach is more universal.

Kidlike avatar Feb 04 '16 22:02 Kidlike