Image is not changing even i changed image

后端 未结 2 951
情歌与酒
情歌与酒 2021-01-29 08:28

In angularjs if i change or remove image it does not make any changes. After refreshing the page it show the changed image.I am using following line to remove image

2条回答
  •  礼貌的吻别
    2021-01-29 09:05

    This Sample is basic if you want to know more about AngularJs click on link

    var app = angular.module("app", []);
    
    app.controller("ctrl", [
      "$scope",
      function($scope) {
        $scope.imgShow = true;
        $scope.imgSrc = "https://www.gravatar.com/avatar/75025ad9a8cfdaa5772545e6e8f41133?s=32&d=identicon&r=PG&f=1";
    
        $scope.display = function() {
          $scope.imgShow = true;
          $scope.imgSrc = "https://www.gravatar.com/avatar/75025ad9a8cfdaa5772545e6e8f41133?s=32&d=identicon&r=PG&f=1";
        }
    
        $scope.change = function() {
          $scope.imgSrc = "https://www.gravatar.com/avatar/fccd71b79b3571b459cdfe40e7bf5dd8?s=32&d=identicon&r=PG&f=1";
        }
    
        $scope.remove = function() {
          $scope.imgShow = false;
        }
    
      }
    ]);
    
    

提交回复
热议问题