chore(core): move compiler out of core
BREAKING CHANGE All imports from 'angular2/core/compiler' should be changed to 'angular2/compiler'.
This commit is contained in:
16
modules/angular2/test/compiler/schema_registry_mock.ts
Normal file
16
modules/angular2/test/compiler/schema_registry_mock.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import {ElementSchemaRegistry} from 'angular2/src/compiler/schema/element_schema_registry';
|
||||
import {isPresent} from 'angular2/src/core/facade/lang';
|
||||
|
||||
export class MockSchemaRegistry implements ElementSchemaRegistry {
|
||||
constructor(public existingProperties: {[key: string]: boolean},
|
||||
public attrPropMapping: {[key: string]: string}) {}
|
||||
hasProperty(tagName: string, property: string): boolean {
|
||||
var result = this.existingProperties[property];
|
||||
return isPresent(result) ? result : true;
|
||||
}
|
||||
|
||||
getMappedPropName(attrName: string): string {
|
||||
var result = this.attrPropMapping[attrName];
|
||||
return isPresent(result) ? result : attrName;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user