Ember.js wait for model inside controller

To manipulate the model data inside the controller before printing it on the template you have to observe the model, when it is changed you call a function to update the data

To manipulate the model data inside the controller before printing it on the template you have to observe the model, when it is changed you call a function to update the data as follow:

@tracked users;
init() {
    super.init(...arguments);
    this.addObserver('model', this, 'modelChanged');
}

modelChanged() {
    console.log('model loaded ::', this.model);
    this.users = this.model;
}


  
controllers/users.js
<ul>
  {{#each this.users as |user index|}}
    <li>{{index}}-{{user.name}}</li>
  {{/each}}
</ul>
templates/users.hbs