Created
November 26, 2018 10:45
-
-
Save devversion/c84f196d68a549e3cbbaacdfccd3aab5 to your computer and use it in GitHub Desktop.
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, Injectable, NgModule} from '@angular/core'; | |
/* | |
* Some service to test dependency injection. Not relevant to read. | |
*/ | |
@Injectable({providedIn: 'root'}) | |
export class SomeService {} | |
/* | |
* Base component from CDK. | |
*/ | |
@Component({ | |
template: 'Cdk Base Template', | |
}) | |
export class CdkBaseComponent { | |
constructor (myService: SomeService) { | |
console.log(myService); | |
} | |
} | |
/* | |
* Component that extends base component from CDK. | |
*/ | |
@Component({ | |
template: 'Enhanced Component Template', | |
}) | |
export class EnhancedComponent extends CdkBaseComponent { | |
somePublicProperty = "my_default_value" | |
} | |
/* | |
* Module definitons to simulate issue. | |
*/ | |
@NgModule({ | |
declarations: [CdkBaseComponent], | |
exports: [CdkBaseComponent], | |
}) | |
export class CdkModule {} | |
@NgModule({ | |
declarations: [EnhancedComponent], | |
exports: [EnhancedComponent], | |
imports: [CdkModule], | |
}) | |
export class Module {} |
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
{ | |
"compilerOptions": { | |
"target": "es2015", | |
"outDir": "./out", | |
"baseUrl": ".", | |
"rootDir": ".", | |
"moduleResolution": "node", | |
"experimentalDecorators": true, | |
"types": [] | |
}, | |
"files": [ | |
"test.ts", | |
], | |
"angularCompilerOptions": { | |
"annotateForClosureCompiler": true, | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment