export class MockViewResolver
export class MockViewResolver
exported from angular2/testing defined in angular2/src/mock/view_resolver_mock.ts (line 7)
Annotations
@Injectable()
@Injectable()
Constructor
constructor()
constructor()
Not Yet Documented
Members
setView(component: Type, view: ViewMetadata) : void
setView(component: Type, view: ViewMetadata) : void
Overrides the ViewMetadata
for a component.
setInlineTemplate(component: Type, template: string) : void
setInlineTemplate(component: Type, template: string) : void
Overrides the inline template for a component - other configuration remains unchanged.
overrideViewDirective(component: Type, from: Type, to: Type) : void
overrideViewDirective(component: Type, from: Type, to: Type) : void
Overrides a directive from the component ViewMetadata
.
resolve(component: Type) : ViewMetadata
resolve(component: Type) : ViewMetadata
Returns the ViewMetadata
for a component:
- Set the
ViewMetadata
to the overridden view when it exists or fallback to the defaultViewResolver
, seesetView
. - Override the directives, see
overrideViewDirective
. - Override the @View definition, see
setInlineTemplate
.