3

I'm working on an AngularJs/asp.net mvc4 app that communicates with the backend through asp.net mvc web api.

The minification of javascript files is done with mvc4, but when i use $http.delete in angular code, the mvc4 minifyer return following error in the bundled file:

/* Minification failed. Returning unminified contents.
(1029,11-17): run-time warning JS1010: Expected identifier: delete
(1029,11-17): run-time error JS1137: 'delete' is a new reserved word and should not be used as an identifier: delete

I have done a workaround that replaces reserved words (in this case 'delete'), which is described here, https://stackoverflow.com/a/13418911/1029874

This means that $http.delete will be replaced with $http.fooDelete, resulting that angular do not recognize it any more.

Is there another workaround or is the simplest solution to use jQuery ajax instead?

4

2 に答える 2