Skip to content

Instantly share code, notes, and snippets.

@jandrodev
Created May 25, 2015 14:47
Show Gist options
  • Save jandrodev/4aebc69337edba27ae23 to your computer and use it in GitHub Desktop.
Save jandrodev/4aebc69337edba27ae23 to your computer and use it in GitHub Desktop.
Angular ng-show Basic Example
<!-- Angular ng-show Basic Example -->
<button ng-click="mostrarInput()">Contacto</button>
<input type="text" placeholder="Contacto" ng-show="mostrar">
<script>
var u87 = angular.module( 'u87', [] );
u87.controller( 'mainController',['$scope', function($scope) {
$scope.mostrar = false;
$scope.mostrarInput = function() {
$scope.mostrar = !$scope.mostrar;
}
}] );
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment