0
我正在運行grunt-contrib-uglify v 2.15.1。當我使用lambda或arrow函數時,它失敗:grunt uglify不接受lambda或arrow函數
Running "uglify:admin" (uglify) task
{ message: 'SyntaxError: Unexpected token: operator (>)',
filename: 'admin-app-ng.js',
line: 4927,
col: 50,
pos: 216049,
stack: 'Error\n at new JS_Parse_Error (eval at <anonymous>
如果我刪除lambda,那麼uglify函數。 使用lambdas /箭頭函數時有沒有辦法使用uglify?
這是箭頭功能:
myService.getActions($scope.myVar, (type) => (type === 'myType')?true:false);