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
export class SomeComponent implements IComponentOptions { | |
bindings: any; | |
templateUrl: any = require('./some-component.html'); | |
require: any; | |
controller: any = SomeComponentController; | |
} | |
export class SomeComponentController { | |
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
export class ExternalService { | |
public static $inject: Array<String> = [ | |
'externalService' | |
]; | |
constructor( private externalService) { | |
} | |
public getSomeState() { | |
return this.externalService.getSomeState(); |
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
export class InternalService { | |
public static $inject: Array<String> = [ | |
'thisDomain.externalService' | |
]; | |
constructor( private externalService) { | |
} | |
public doSomething() { | |
return this.externalService.getSomeState(); |
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
export class InternalService { | |
public static $inject: Array<String> = [ | |
externalService' | |
]; | |
constructor( private externalService) { | |
} | |
public doSomething() { | |
return this.externalService.getSomeState(); |
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
if(featureToggleService.isFeatureEnabled(‘FEATURE_NAME’)) { | |
doNewCode; | |
} else { | |
doOldCode; | |
} |
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
if(featureToggleService.isFeatureEnabled('FEATURE_NAME')) { | |
doNewCode; | |
} else { | |
doOldCode; | |
} |