下面的代碼:不能理解這個匿名函數的語法在Javascript
angular.module('socially').controller('PartiesListCtrl', function ($scope)
{
$scope.helpers({
parties:() => {
return Parties.find({});
}
});
});
不能理解用於parties:
對象的語法。爲什麼使用=>
?這種匿名函數有更多解釋嗎?
我可能是錯的,但這看起來像一個箭頭函數。 – Rajesh
感謝新的箭頭功能語法 –