Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<div *featureFlag="'a' or 'c'">...</div>
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