Skip to content

Instantly share code, notes, and snippets.

Created January 2, 2018 03:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/345e2fe5a03c0b028e5db288f7f18fa2 to your computer and use it in GitHub Desktop.
Save anonymous/345e2fe5a03c0b028e5db288f7f18fa2 to your computer and use it in GitHub Desktop.
<html ng-app="myApp">
<head>
<script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"></script>
</head>
<body ng-controller="myController">
<input type="text" ng-model="keyworld">
<input type="button" value="clear" ng-click="clear()" ng-if="keyworld !='' ">
<script>
var app = angular.module('myApp', []);
app.controller('myController', function($scope) {
$scope.keyworld = '';
$scope.clear = function(){
$scope.keyworld = '';
}
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment