hino / app / components / app-button-show-all.js
app-button-show-all.js
Raw
import Component from '@ember/component';

export default Component.extend({
    isShow: true,
    text : "",
    id : "",
    init() {
        this._super(...arguments);
        if (this.isShow == undefined) {
            this.set("isShow", false);
        }
    },
    actions : {
        toggleButton() {
            if (this.isShow) {
                this.set("isShow", false);
            } else {
                this.set("isShow", true);
            }
        }
    }
});