JSFiddle - React, Tailwind, and code Playground

by Swensson

HTML

<script src="https://code.angularjs.org/1.1.5/angular.js"></script>
<div ng-app="myapp">
    <div ng-controller="PersonCtrl as person">
        <input placeholder="Firstname" type="text" ng-model="person.first">
        <input placeholder="Lastname" type="text" ng-model="person.last">
        <p>Fullname: {{ person.fullName() }}</p>
    </div>
</div>

JavaScript

angular.module('myapp', [])
.controller('PersonCtrl', function () {
    this.first = '';
    this.last = '';
    this.fullName = function() {
        return this.first + ' ' + this.last;
    };
});