feat(attrs): trigger observers for specific ng-attributes#7758
Conversation
|
I envy the poor soul who will have to review this |
There was a problem hiding this comment.
I don't understand what this test is saying is happening. did you misspell ng-maxlength?
There was a problem hiding this comment.
this function is missing constant / literal markers
There was a problem hiding this comment.
you mean the name of the function?
There was a problem hiding this comment.
Functions returned by $parse have a constant and literal property on them (docs for it)
I believe they're both true in this case
There was a problem hiding this comment.
we're only using literal for JSON literals currently, so it's not clear if it should include regexp literals too, but it's definitely constant
There was a problem hiding this comment.
So what exactly should I fix then?
There was a problem hiding this comment.
a simple fix would be this:
return extend(function() {
return regexp;
}, {
constant: true,
literal: false // or true? depending on how people feel about it
});There was a problem hiding this comment.
Ah so these are special flags used within the internals of the parser?
There was a problem hiding this comment.
yeah, $scope will automatically unwatch a constant expression, and I think we use literal in ngClass or something, can't remember
…ly instantiate regular expressions Closes angular#7758
There was a problem hiding this comment.
I don't know if we still need it for IE9, but there is _nodename helper method to get name in a cross browser happy way
There was a problem hiding this comment.
or check for nodeType instead.
When an observer is set to listen on the pattern, minlength or maxlength attributes via $attrs then the observer will also listen on the ngPattern, ngMinlength and the ngMaxlength attributes as well. Closes angular#7758
When an observer is set to listen on the pattern, minlength or maxlength attributes via $attrs then the observer will also listen on the ngPattern, ngMinlength and the ngMaxlength attributes as well. Closes angular#7758
|
Landed as d9b90d7 |
When an observer is set to listen on the pattern, minlength or maxlength attributes via $attrs then the observer will also listen on the ngPattern, ngMinlength and the ngMaxlength attributes as well. Closes angular#7758
No description provided.