In my project I need to setup an IE11 compatible VueJs application where I'm using polyfills for fetch and promises.
Now my problem is, that the IE11 obviously also doesn't support "Fat arrows" as well. Using functions
instead of Fat arrows
I'm loosing my context so that I'm not able to set the resposne to my data.
let app = new Vue({
data: {
myindex : []
},
beforeMount: function(){
myClient.getIndex().then((index) => this.myIndex = index); //This does not work in IE11 due to the fat arrow
myClient.getIndex().then(function(index) => {
this.myIndex = index
}); // This does not work due to the missing context. this.myIndex is not known here...
}
});
Is there any "native" way to set the response/result to data.