You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Version 1.5.0:restrict 'A' on component() fails silently which might cause a lot of confusion #13966
In early versions of AngularJS 1.5, it was possible to use restrict: 'A' for component() method, and I used it widely in my code. Breaking change came with 1.5.0-rc.1 quantum-fermentation (2016-01-15), where only restrict: 'E' became permitted, but I missed it (I think not only me) because I stayed with one of the previous 1.5.0 versions. Today I updated Angular's files to 1.5.0 final release and components with restrict: 'A' weren't visible and it took me a while to figure out that I have to replace attribute usages to element usages. Maybe, to avoid confusion, it should throw an Error when component() method meets restrict other than 'E'?
Thank you in advance for looking on this post.
I tried to implement the Component and Component Router of Angular1.5.It is an error in the difference of the value of the restrict for the Component and Component Router.
@albatrosary, this has been fixed with angular/angular#6796 (the router will create elements, instead of divs). The fix will be included in the next release of the router.
Since not many people will be affected by the BC from beta to 1.5.0, we'll not gonna log / throw etc. here. Maybe we can do the validation inside the ngHint project, but that's also very low priority: angular/angular-hint#118
Activity
petebacondarwin commentedon Feb 8, 2016
Yes we talked about this recently... I think there might even be a PR somewhere.
gkalpak commentedon Feb 8, 2016
The only relevant PR that I can think of is #13802 (which does not exactly cover this issue, but unsupported CDO properties in general).
@petebacondarwin, was #13802 what you had in mind ?
petebacondarwin commentedon Feb 8, 2016
Oh yes, @gkalpak that was it. Looks like I wasn't keen. :-/
albatrosary commentedon Feb 9, 2016
Hello, everyone
I tried to implement the Component and Component Router of Angular1.5.It is an error in the difference of the value of the restrict for the Component and Component Router.
ComponentRouter is so as not to accept only 'A'.
(angular_1_router.js)
But Angular1 Component is 'E'.
(angular/angular1.js)
When I say that either, I think that is good to the 'E'.
Thank you.
gkalpak commentedon Feb 9, 2016
@albatrosary, this has been fixed with angular/angular#6796 (the router will create elements, instead of divs). The fix will be included in the next release of the router.
albatrosary commentedon Feb 9, 2016
@gkalpak, Great! ,Thank you.
Narretz commentedon Feb 15, 2016
Since not many people will be affected by the BC from beta to 1.5.0, we'll not gonna log / throw etc. here. Maybe we can do the validation inside the ngHint project, but that's also very low priority: angular/angular-hint#118