" ReferenceError:赋值中的左侧无效"当使用逻辑和

时间:2016-09-26 07:11:25

标签: javascript if-statement

我写了一个条件,但不幸得到了ReferenceError:在作业中左手边无效,我不知道我在这里做错了什么..有人可以帮我吗

      if((!isEmpty($rootScope.appState.template.contentSelections.upload.JSON))) && (( $rootScope.appState.template.contentSelections.Options.DELIVERY_METHOD == 'email' && $scope.generated.deliveryChannels = "EE/ER")|| ($rootScope.appState.template.contentSelections.Options.DELIVERY_METHOD == 'email_print' && $scope.generated.deliveryChannels = "EE/ER/Print"))) 

我在这里看到没有错误..但仍然收到此错误

1 个答案:

答案 0 :(得分:1)

  if((!isEmpty($rootScope.appState.template.contentSelections.upload.JSON))) && (( $rootScope.appState.template.contentSelections.Options.DELIVERY_METHOD == 'email' && $scope.generated.deliveryChannels == "EE/ER")|| ($rootScope.appState.template.contentSelections.Options.DELIVERY_METHOD == 'email_print' && $scope.generated.deliveryChannels == "EE/ER/Print")))

你在最后和中间错过了=