JSFiddle - React, Tailwind, and code Playground
by stevenng
HTML
<div ng-app="MyApp">
<div ng-controller="PostCtrl">
<div ng-repeat="post in posts">
<strong>{{post}}</strong>
<input type="text" ng-model="postText">
<a href="#" ng-click="savePost()">save post</a>
</div>
</div>
</div>
JavaScript
angular.module('MyApp',[]);
function PostCtrl($scope) {
$scope.posts = ['tech', 'news', 'sports', 'health'];
$scope.savePost = function(){
alert( 'post stuff in textbox: ' + $scope.postText);
}
}