import { addBooleanParameter, addDefaultParameter } from "@ovh-ui/common/component-utils"; export default class { /* @ngInject */ constructor ($attrs, $element, $timeout) { this.$attrs = $attrs; this.$element = $element; this.$timeout = $timeout; } $onInit () { addBooleanParameter(this, "disabled"); addDefaultParameter(this, "type", "button"); addDefaultParameter(this, "variant", "secondary"); } $postLink () { // Sometimes the digest cycle is done before dom manipulation, // So we use $timeout to force the $apply this.$timeout(() => this.$element .removeAttr("aria-label") .removeAttr("id") .removeAttr("name") ); } }