Created
November 11, 2021 20:23
-
-
Save mts88/cf5d7c71d3a7aa951cfdaeef2869bd65 to your computer and use it in GitHub Desktop.
Feature Flag Usage
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, OnInit } from '@angular/core'; | |
import { FeatureFlagService } from 'src/app/shared/services/feature-flag.service'; | |
@Component({ | |
selector: 'app-image', | |
templateUrl: 'image.component.html', | |
styles: [], | |
}) | |
export class ImageComponent implements OnInit { | |
constructor(private readonly featureFlagService: FeatureFlagService) {} | |
ngOnInit(): void { | |
if (this.featureFlagService.isEnabled('image_tagging')) { | |
// Do something | |
} else { | |
// Do something else | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment