Hey there! Below is my HTML code where I'm trying to implement a countdown function using AngularJS.
var app = angular.module('myCountDown', []);
app.controller("Countdown",function($scope){
$scope.start = function(){
var temp = $scope.inputValue;
setInterval(function(){
if(temp<1){
return ;
}
temp -= 1;
$scope.count = temp;
console.log($scope.count);
},1000);
}
})
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8>
<title>Document</title>
</head>
<body ng-app="myCountDown">
<div ng-controller="Countdown">
<input type="text" ng-model="inputValue">
<button ng-click="start()">Start</button>
<input type="text" ng-model="count">
</div>
<script src="angular.min.js"></script>
<script src="app.js"></script>
<
I have the result displaying in the console, but it's not showing on the webpage for some reason.
Thank you!