Hi Evan,
Thank you for your answer.
I'm using 7.2.0 modern. I'm aware of "store.loading" binding in a viewModel. The problem I have is with link. I do understand that viewModel is updated only when link is updated. It makes perfect sense. Only if there was a easy way to attach to load event.
At the moment I have to literately do this.
In controller.
Code:
load: function(id){
this.getViewModel().set('loading', true);
App.model.Record.load(id, {
scope: this,
callback: function(rec, op, success){
this.getViewModel().set('theRecord', rec);
this.getViewModel().set('loading', false);
}
})
}
I was hoping for...
In a ViewController
Code:
load: function(id){
this.getViewModel().linkTo('theRecord', { type: 'Record', id: id });
}
And in a View.
Code:
{
bind: {
masked: '{theRecord.loading ? "Loading..." : false }'
}
}
All this just because I'm using routing and can not pass objects between views anymore. Just id's.