图像如何隐藏在angularjs中

图像如何隐藏在angularjs中,angularjs,Angularjs,您可以使用下面的代码 validationApp.controller('mainController', function($scope) { // function to submit the form after all validation has occurred $scope.myvalue=true; $scope.submitForm = function() { // check to make su

您可以使用下面的代码

validationApp.controller('mainController', function($scope) {

        // function to submit the form after all validation has occurred    

        $scope.myvalue=true;
        $scope.submitForm = function() {

        // check to make sure the form is completely valid

    };

试试这个:

<img ng-cloak  ng-if="message.Attachment" ng-src="path here" alt="  {{message.Attachment}}">

作用域区分大小写,请将myValue更改为myValue


检查代码笔:

我将省略不必要的细节

  <div id="c2"><img  ng-hide="myvalue" ng-src="D:/AngularJS/images/Assets/WIP.png" /></div>
  <div id="c3"  ng-hide="myValue1"  class="ng-hide"><img  ng-hide="myValue1"  ng-src="D:/AngularJS/images/Assets/compleated.png" /></div>


此外,还可以使用“不仅仅单击事件”。您可以根据需要使用任何条件。只需尝试在其他地方更改cond变量,并检查发生了什么。

您的问题是什么?请在提问时尽量清晰,并按照建议使用适当的方式
  <div id="c2"><img  ng-hide="myvalue" ng-src="D:/AngularJS/images/Assets/WIP.png" /></div>
  <div id="c3"  ng-hide="myValue1"  class="ng-hide"><img  ng-hide="myValue1"  ng-src="D:/AngularJS/images/Assets/compleated.png" /></div>
<img ng-hide="cond" ng-click="cond = !cond" ... />