Created
July 31, 2019 19:27
-
-
Save NetanelBasal/d716b102c3d5558a240b3e331cccd634 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
<div *featureFlag="'a' or 'c'">...</div> |
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 FeatureFlagDirective { | |
@Input() featureFlag: string | string[]; | |
@Input() featureFlagOr: string = ''; | |
... | |
ngOnInit() { | |
if (this.userQuery.hasFlags(this.featureFlag) || | |
this.userQuery.hasFlags(this.featureFlagOr) | |
) { | |
this.vcr.createEmbeddedView(this.tpl); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment