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 }}
Repository navigation
Better error reporting for [(ng-model)]="exp" syntax #3662
This [(ng-model)]="exp" will work while ([ng-model])="exp" will fail silently. We should either throw or allow both forms (not sure if it makes sense).
We should throw on any attribute which is not valid. I think in this case this gets interpreted as event called [ngModel] so we should have some check which say that event names must be alphanumeric.
Hmm, digging into it a bit more it seems like HTML spec are putting very little restrictions on the possible event names.... If I understand correctly there is nothing that would prevent one from creating a custom event named [foo] and in this sense ([foo])="actionExp()" should be valid...
Another way of looking into it is that with custom directive events one can only declare events that are valid JS field names. So maybe we should be more restrictive here and stick to the lowest-common-denominator
👍 on creating custom restrictions specific to Angular. I think this shouldn't be a problem since prolly no one would come up defining event names that start with [ or ( anyways..
thanks @PascalPrecht. @cironunes,@pkozlowski-opensource - can I help with this one?
I'm looking to get in and start contributing to this project. Any help "getting in" will be highly appriciated
Activity
0x-r4bbit commentedon Aug 17, 2015
For consistency I'd also rather vote for throwing an error instead of allowing both syntaxes.
mhevery commentedon Aug 19, 2015
We should throw on any attribute which is not valid. I think in this case this gets interpreted as event called
[ngModel]so we should have some check which say that event names must be alphanumeric.mhevery commentedon Aug 19, 2015
cc: @pkozlowski-opensource
pkozlowski-opensource commentedon Aug 19, 2015
OK, makes sense. I will start introducing event checks as part of the schema support, we could have some basic event name checks for the start.
Will take care of this one (or can help out if anyone from the community is interested!)
pkozlowski-opensource commentedon Aug 20, 2015
Hmm, digging into it a bit more it seems like HTML spec are putting very little restrictions on the possible event names.... If I understand correctly there is nothing that would prevent one from creating a custom event named
[foo]and in this sense([foo])="actionExp()"should be valid...Another way of looking into it is that with custom directive events one can only declare events that are valid JS field names. So maybe we should be more restrictive here and stick to the lowest-common-denominator
0x-r4bbit commentedon Aug 20, 2015
👍 on creating custom restrictions specific to Angular. I think this shouldn't be a problem since prolly no one would come up defining event names that start with
[or(anyways..feat(ProtoViewBuilder): throw for invalid event names
feat(ProtoViewBuilder): throw for invalid event names
yanivefraim commentedon Aug 30, 2015
@pkozlowski-opensource I would love to get this as my first issue here (:
But I'll need some help with that, if you can. 10x!
0x-r4bbit commentedon Aug 31, 2015
@yanivefraim maybe you can collaborate with @cironunes. Looks like he started working on this already.
@pkozlowski-opensource or did you also already start with sth?
yanivefraim commentedon Aug 31, 2015
thanks @PascalPrecht.
@cironunes,@pkozlowski-opensource - can I help with this one?
I'm looking to get in and start contributing to this project. Any help "getting in" will be highly appriciated
mhevery commentedon Oct 19, 2015
dup of #4737
angular-automatic-lock-bot commentedon Sep 7, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.