Closed. This question is not reproducible or was caused by typos。它当前不接受答案。
                        
                    
                
            
        
            
        
                
                    
                
            
                
                    想改善这个问题吗? Update the question,所以它是on-topic,用于堆栈溢出。
                
                    3年前关闭。
            
        

    

正在写一个条件,但不幸地得到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")))


我在这里看不到任何错误..但是仍然出现此错误

最佳答案

  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")))


您在末尾和中间错过了=

关于javascript - 使用逻辑和时出现“ReferenceError:分配中的左侧无效”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39696726/

10-09 21:42