Code: Select all
password-with-generator
|
---- component.js
---- template.hbs
< /code>
und der Code lautet wie folgt
component.js
import {computed, get, set} from '@ember/object'
import {alias} from '@ember/object/computed'
import PasswordInput from 'internal-bunsen/components/inputs/password'
import _ from 'lodash'
import layout from './template'
export default PasswordInput.extend({
layout,
showGeneratePassword: computed('disabled', 'options.policyRules',
// logic
).readOnly(),
init () {
this._super(...arguments)
set(this, 'layout', layout)
},
actions: {
generatePassword () {
//logic
}
}
})
< /code>
Template.hbs
{{log 'my template'}}
My template
Gibt es eine Möglichkeit, alte Funktionen zu erreichen?>