I am learning Ember.js. I was working on a component class
Here my code:
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { inject as service } from '@ember/service';
import { tracked } from '@glimmer/tracking'
export default class TodoListComponent extends Component {
@service todoData;
@tracked canToggle = true;
get areAllComplete() {
let **{todos}** = this.args;
return todos.every(todo => {
return todo.isCompleted;
});
}
}
Can anyone tell me What is the difference between let todos = this.args; and let { todos } = this.args; in JavaScript ?
Aucun commentaire:
Enregistrer un commentaire