I'm using Firefox 56 with dom.moduleScripts.enabled
set to true. This allows me to work with native ES6 modules.
I have a vue2 component which has a method defined:
import StorageZonesAjaxMethods from '../../ajax/storage-zones.js';
....
methods: {
updateList()
{
//console.log(StorageZonesAjaxMethods);
StorageZonesAjaxMethods.getList();//function(response) { this.list = response.data.payload;});
},
},
where the class with the methods is:
export default new class StorageZonesAjaxMethods {
static getItem(id, then)
{
axios.get(`${Config.apiBaseUrl}/storage-zones/${id}`)
.then(response => then);
}
static getList(then)
{
alert('in get list');
axios.get(`${Config.apiBaseUrl}/storage-zones`)
.then(response => then);
}
I get the error "TypeError: (intermediate value).getList is not a function"
in firefx, but the console.log shows it is, but it's inside a constructor for some reason. What's going on?