JSFiddle - React, Tailwind, and code Playground
by yonet3d
HTML
<body ng-app="phonecatApp">
<div ng-controller="PhoneListCtrl">
<input ng-model="searchFor" placholder="Search..."/>{{filterBy}}
<ul>
<li ng-repeat="phone in phones | filter:searchFor">
<span>{{phone.name}}</span>
<p>{{phone.snippet}}</p>
</li>
</ul>
<button ng-click="delete()">Delete</button>
</div>
</body>
JavaScript
var phonecatApp = angular.module('phonecatApp', []);
phonecatApp.controller('PhoneListCtrl', function ($scope) {
$scope.phones = [
{'name': 'Nexus S',
'snippet': 'Fast just got faster with Nexus S.'},
{'name': 'Motorola XOOM™ with Wi-Fi',
'snippet': 'The Next, Next Generation tablet.'},
{'name': 'MOTOROLA XOOM™',
'snippet': 'The Next, Next Generation tablet.'}
];
$scope.delete = function() {
$scope.phones = [];
}
});