fix(core): support components without a selector (#10331)

Components without a selector now get the selector `ng-component`.
Directives without a selector will throw an error message.

Closes #3464
Closes #10216
This commit is contained in:
Tobias Bosch
2016-07-28 19:39:10 +02:00
committed by Hans
parent a67cc8229d
commit 9b39e499ac
8 changed files with 61 additions and 7 deletions

View File

@ -313,4 +313,6 @@ export class DomElementSchemaRegistry extends ElementSchemaRegistry {
var mappedPropName = StringMapWrapper.get(attrToPropMap, propName);
return isPresent(mappedPropName) ? mappedPropName : propName;
}
getDefaultComponentElementName(): string { return 'ng-component'; }
}

View File

@ -12,4 +12,5 @@ export abstract class ElementSchemaRegistry {
abstract hasProperty(tagName: string, propName: string, schemaMetas: SchemaMetadata[]): boolean;
abstract securityContext(tagName: string, propName: string): any;
abstract getMappedPropName(propName: string): string;
abstract getDefaultComponentElementName(): string;
}