vue-feature
v1.0.2
Published
Lightweight directive and instance method in vuejs for feature toggling based on configuration keys in your `feature.config.js` file.
Downloads
2
Readme
Basic usage
Lightweight directive and instance method in vuejs for feature toggling based on configuration keys in your feature.config.js
file.
In your feature.config.js
export default {
'specific-feature-toggle': {
status: true
}
}
In your main.js
import vueFeature from 'vue-feature'
import config from '../path-to-config/feature.config'
Vue.use(vueFeature,config)
In your markup
<div v-feature:specific-feature-toggle>
</div>
In your javascript
mounted(){
this.$feature('specific-feature-toggle') ? this.dothis() : this.doThat()
}