JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app ng-controller="LoginController">
    <div>Hello {{ user.firstName }}</div>
    <input ng-model="user.firstName"></input>
    <input type="submit" ng-click="login()" value="Login"></input>
    <div ng-repeat="login in logins">{{ login }}</div>
</div>

JavaScript

function LoginController($scope) {
    $scope.user = {
        firstName: "Foo"
    };
    $scope.$watch('user.firstName',function(){
        alert("Your name is changed to : "+$scope.user.firstName);
    });
    $scope.logins = [];
    $scope.login = function () {
    	alert("in");
       /*  alert("login with: " + $scope.user.firstName); */
        $scope.logins.push($scope.user.firstName + " was logged in.");
    };
}