I have this little piece of JavaScript code in my angular project that throws a syntax error when running in IE 11 but works fine in Chrome. This function isn't even invoked on the loading page but the error is still thrown.
If I comment it out the page loads fine.
It seems to be complaining about the .then
line, and I have no idea why.
$scope.showNewTeamDialog = function (ev) {
$mdDialog.show({
controller: NewTeamDialogController,
templateUrl: 'NewTeam.html',
locals: { newTeamName: $scope.newTeamName },
parent: angular.element(document.body),
targetEvent: ev
}).then((newTeamName) => {
if (newTeamName != undefined) {
$scope.newTeamName = newTeamName.newTeamName;
$scope.createNewTeam();
}
});
};