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
[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
now schemas are not extendable, only hard-coded CUSTOM_ELEMENT_SCHEMA and NO_ERRORS_SCHEMA available. if a user want to add new schema, they have to modify DomElementSchemaRegistry.hasElement,DomElementSchemaRegistry.prototype.hasProperty or other compiler methods to do it. like this https://github.com/moecube/electron-schema/blob/master/index.ts
make DomElementSchemaRegistry.hasElement,DomElementSchemaRegistry.prototype.hasProperty and other compiler methods to read schemaMetas not only name, but also some contents, for example, a string[] like SCHEMA defined in
I'm submitting a ... (check one with "x")
Current behavior
now schemas are not extendable, only hard-coded
CUSTOM_ELEMENT_SCHEMA
andNO_ERRORS_SCHEMA
available. if a user want to add new schema, they have to modifyDomElementSchemaRegistry.hasElement
,DomElementSchemaRegistry.prototype.hasProperty
or other compiler methods to do it. like thishttps://github.com/moecube/electron-schema/blob/master/index.ts
Expected behavior
angular/packages/compiler/src/schema/dom_element_schema_registry.ts
Line 287 in 5b141fb
make
DomElementSchemaRegistry.hasElement
,DomElementSchemaRegistry.prototype.hasProperty
and other compiler methods to read schemaMetas not only name, but also some contents, for example, astring[]
like SCHEMA defined inangular/packages/compiler/src/schema/dom_element_schema_registry.ts
Line 79 in 5b141fb
then user can just declare something like
then put it in ngModule.schemas .
for more clearly, it could be a interface rather than a string, like..
for more dynamic use, it could also be a function-based interface, it can combined with normal SchemaMetadata interface, for example:
then
CUSTOM_ELEMENTS_SCHEMA
andNO_ERROES_SCHEMA
could also be a normal SchemaMeta, and don't need hard-code in compiler, likeThe text was updated successfully, but these errors were encountered: