JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app>
    <div ng-controller="testIt" ng-switch on="submitted">
        <div ng-switch-when="true">
            <p>Submitted</p>
        </div>
        <div ng-switch-when="false">
            <form ng-submit="submit()">
                <input type="text" ng-model="email.email"/>
                <p>{{email.email}}</p>
                <button type="submit">Submit</button>
            </form>
        </div>
        <div ng-switch-default>Default</div>
    </div>
</div>

JavaScript

function testIt($scope) {
    $scope.submitted = false;
    $scope.email = {};
    $scope.submit = function () {
        //$scope.submitted = true;
        alert($scope.email.email);
    }
}