Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colon normalization of element directives for v1.4.7 #28

Open
Kidlike opened this issue Feb 2, 2016 · 2 comments
Open

colon normalization of element directives for v1.4.7 #28

Kidlike opened this issue Feb 2, 2016 · 2 comments

Comments

@Kidlike
Copy link

Kidlike commented Feb 2, 2016

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 Kidlike changed the title colon normalization of element directives colon normalization of element directives for v1.4.7 Feb 2, 2016
@fergaldoyle
Copy link
Owner

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.

@Kidlike
Copy link
Author

Kidlike commented Feb 4, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants