2016-12-15 53 views

回答

0

試試這個:

控制器:

var myApp = angular.module('myApp', []); 

myApp.controller('myCtrl', function($scope) { 
    $scope.inputdata = true; 
}); 

查看:

<div class="content" ng-app="myApp" ng-controller="myCtrl"> 
    <div class="field"> 
     <button ng-click="inputdata = false">Show Popup</button> 
     <div ng-show="!inputdata" class="popup"> 
     </div> 
    </div> 
</div> 

風格:

.popup{padding:10px;display:block;position:absolute;top:0;left:0;height:30px;width:200px;background:#efefef;} 
+0

謝謝rohit – vyshnavi