# 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.

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

### Check if a feature is on

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

### Check if a feature is off

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

### Evaluate a feature gate (with requirement & negate support)

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