箭头功能在iOS 9中不起作用

时间:2016-11-07 07:15:39

标签: javascript ecmascript-6 ios9 arrow-functions

我是es6的新手,并考虑在遗留系统中实现箭头功能。

我编写了一个通用函数来执行每个ajax调用。以下是我正在使用的代码。它没有在iOS9中执行。

    var Promise = httpCall(apiUrl,requestMap,"json",true);
    Promise.success(data => {callback(data);});
    Promise.error(data => {console.log("SequenceId:error:"+data.responseText);});
    function httpCall(apiUrl, data, dataType, async) {
        return $.ajax({
            url: apiUrl,
            dataType: dataType,
            data: data,
            async: async
        })
    }

我还发现iOS 9中不支持以下链接的箭头功能。     http://kangax.github.io/compat-table/es6/

但我只想了解是否有任何解决方法可以解决这个问题。

0 个答案:

没有答案