问题
While loading Ui-Grid In IE throwing error messages -
[true] [SYSERR] Multiple definitions of a property not allowed in strict mode [object Object]
Issue is only in IE, Not throwing any errors in FireFox & Chrome. Tested on IE Version-11.
Thanks in Advance.
回答1:
As the error state, you are using somewhere an object that has more than one property with the same name . Something like :
var obj= {
property1: 0,
property2: 1,
property1: 2
};
Printing the upper object results in :
{ property1: 2, property2: 1 }
Also searching a little bit on stack overflow, you can find a more detailed answer why this error is outputed in Internet Explorer
What's the purpose of allowing duplicate property names?
回答2:
Its difficult to find multiple definition manually when you have long code written by someone else.
I used http://jshint.com/ and pasted code there, it showed me all duplicate warnings and I fixed those everything worked.
来源:https://stackoverflow.com/questions/35497966/ui-grid-error-multiple-definitions-of-a-property-not-allowed-in-strict-mode