JSFiddle - React, Tailwind, and code Playground
by blashadow
HTML
<div ng-app="myApp">
<div ng-controller="test">
<a href="" ng-click="nice = !nice">{{name}}</a>
<br/>
<br/>
<a href="" ng-click="clear()">Clear</a>
<input type="text" ng-model='current'/>
<button ng-click="add()">Add</button>
<ul ng-show="isValid()">
<li ng-repeat="item in values">{{item}}</li>
</ul>
</div>
</div>
JavaScript
var myApp = angular.module('myApp', []).controller('test',function($scope){
$scope.name = "Hola";
$scope.nice = true;
$scope.isValid = function(){
return $scope.nice == true;
}
$scope.values = [];
$scope.clear = function(){
$scope.values = [];
}
$scope.add = function(){
$scope.values.push($scope.current);
$scope.current = "";
}
});