Created
March 12, 2019 23:50
-
-
Save t-palmer/9005ddb84e09bfd4963e44dcdedec70b to your computer and use it in GitHub Desktop.
Child stub component with providers for testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { ChildComponent } from './child.component'; | |
@Component({ | |
selector: 'app-child', | |
template: '', | |
providers: [ | |
{ | |
provide: ChildComponent, | |
useClass: ChildStubComponent | |
} | |
] | |
}) | |
export class ChildStubComponent { | |
updateTimeStamp() {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment