Я использовал vue js 2 на одном из веб-сайтов, и оказалось, что в предыдущих выпусках Internet Explorer возникла проблема совместимости.
Ошибка:
SCRIPT1003: Expected ':'
Воткод
methods: {
dataLoaded() {
var ctx = this;
if (window.location.hash) {
var fragmentData = window.location.hash
.replace("#", ""),
.split("/");
var categoryId = fragmentData[0];
var categoryIndex = null;
var offerIndex = parseInt(fragmentData[1]);
var category = this.categories.filter(function(category, index) {
if (category.id == categoryId) categoryIndex = index;
return category.id == categoryId;
})[0];
if (category) {
if (!category.loaded) {
this.loadOffers(category, function() {
if (category.offers[offerIndex]) {
ctx.showDetails(
category.offers[offerIndex],
categoryIndex,
offerIndex
);
}
});
} else if (category.offers[offerIndex]) {
this.showDetails(
category.offers[offerIndex],
categoryIndex,
offerIndex
);
}
}
}
},