Directly Checking a Flag

You can use $toggly to check if a feature is ON or OFF programmatically, by simply injecting it in any component.

export default {
  inject: ['$toggly'],
  ...
}

Check if a feature is on

await this.$toggly.isFeatureOn('firstFeature')

Check if a feature is off

await this.$toggly.isFeatureOff('secondFeature')

Evaluate a feature gate (with requirement & negate support)

await this.$toggly.evaluateFeatureGate(['firstFeature', 'secondFeature'], 'any', true)

Last updated