JSFiddle - React, Tailwind, and code Playground

by yonet3d

HTML

<body ng-app="app">
    <div ng-controller="MainController">
        <input type="text" />
        <ul>
            <li ng-repeat="do in todos">{{do}}</li>
        </ul>
        <button ng-click="addTodo()">Add To-Do</button>
    </div>
</body>

JavaScript

var app = angular.module('app', []);

app.controller('MainController', ['$scope', function($scope){
    $scope.todos = [];
    //$scope.addTodo
    
}])

//Add ng-model to the input tag and name a scope variable as a value

//Give the value of ng-model to the addTodo() function in button tag as an argument.

//Create the addTodo function in the controller to add it to the todo list.

//addTodo function should also clear the ng-model value once you add the todo to your list.