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
The functions would check if the given token (element or attribute name) is valid, it's optional for full backwards compatibility (though that's probably not even necessary). Alternatively this could be split into two functions (attributeValid & elementValid).
Then there could be a class or helper function that generates an object which simply checks if the given token is within a set of previously defined tokens.
This would also clean up existing code because you don't have to hardcode the logic of the schema everywhere it's used.
If you approve, I can implement this and PR, should be pretty simple.
The text was updated successfully, but these errors were encountered:
🚀 feature request
Relevant Package
This feature request is for @angular/core
Description
Currently there are two schemas available to allow non-angular custom elements and attributes:
However, there is no way to limit the allowed elements any further or to specify a number of allowed elements, for example to check for typos.
Describe the solution you'd like
I'd expand the
SchemaMetadata
interface like this:The functions would check if the given token (element or attribute name) is valid, it's optional for full backwards compatibility (though that's probably not even necessary). Alternatively this could be split into two functions (
attributeValid
&elementValid
).Then there could be a class or helper function that generates an object which simply checks if the given token is within a set of previously defined tokens.
This would also clean up existing code because you don't have to hardcode the logic of the schema everywhere it's used.
If you approve, I can implement this and PR, should be pretty simple.
The text was updated successfully, but these errors were encountered: