<!DOCTYPE html>
<html ng-app="lesson" ng-controller="lesson2" >
<head>
<meta charset ="UTF-8">
<title>Document</title>
</head>
<body>
<p ng-show="aa">文章内容</p>
<button ng-click="Coo()">隐藏</button>
<script type="text/javascript" src="angular-1.5.5/angular.min.js"></script>
<script type="text/javascript">
var app=angular.module("lesson",[]);
app.controller("lesson2",function($scope){
$scope.aa=true;
$scope.Coo=function(){
$scope.aa=!$scope.aa;
}
});
</script>
</body>
</html>
AngulaJs显示隐藏
最新推荐文章于 2022-12-22 10:50:10 发布