错误Gulp构建:异步功能仅在es8中可用(使用esversion 8)

时间:2019-07-11 17:37:50

标签: angularjs asynchronous gulp

当我要用gulp编译代码时 显示以下错误(突出显示图像)。 Link to open the print

它遵循1685行的功能,该行在角度cli中使用异步。

$scope.GetNomePacienteIndicou = async function(chave_indicacao){

        chave = {};
        chave.chave_indicacao = chave_indicacao;
        PacienteIndicou = {};
        //console.log('teste getnomepaciente: ', chave);
        return AgendaService.GetNomePacienteIndicou(chave)
            .then(function(data){
                return data.data.dados[0];
                // $scope.GetNomePacienteIndicou = data.data.dados[0];
                // this.PacienteIndicou = $scope.GetNomePacienteIndicou; 
                // return this.PacienteIndicou;
            });

    };

我该如何解决? 谢谢!

0 个答案:

没有答案