Countdown timer concept with AngularJS – Part1
In this experiment, we proved how fast you can build a very simple, custom countdown timer with AngularJS.
Check the Demo
This still isn’t a MVP (minimal viable product) but merely a concept, from which we will build the final and complete version of the Countdown timer.
This is a new version (from article “part2”):
Check the Demo Part 2
Version 1:
Check the Demo Part 1
This experiment will be done in 4 parts and the final version will contain:
- Input field for hours, minutes and seconds that the user will choose
- Message and “beep” sound at the end of the countdown
Stay tuned ’till next time, when the countdown will be more useful than this version.
The code in JS file:
var myModule = angular.module("countdownApp", [/* No Dependency Injection */]);
myModule.controller("counterCtrl",['$scope','$timeout', function($scope,$timeout){
//Number to count from
$scope.counter = 100;
var stopped;
//timeout function
//1000 milliseconds = 1 second
//Every second counts
$scope.countdown = function() {
stopped = $timeout(function() {
console.log($scope.counter);
$scope.counter--;
$scope.countdown();
}, 1000);
};
$scope.stop = function(){
$timeout.cancel(stopped);
}
}]);
Till next time, take care.
Magical automated way of doing animations – with Stable diffusion with Deforum extension
Let’s explore the magical of doing animations – automated and unpredicable. Yes, you input the text prompt and have general control, but the magical part is, that you let the […]
Stable diffusion AI – high resolution generated art
What is Stable Diffusion AI? Stable Diffusion is a deep learning, text-to-image model released in 2022. It is primarily used to generate detailed images conditioned on text descriptions, though it […]
Tailwind CSS – Dream way of building UI and quick landing pages
This is a quick review and demo of the “utility style CSS framework” named “Tailwindcss” – https://tailwindui.com/ What is Tailwind CSS? Tailwind CSS is a utility-first CSS framework that provides […]
Blender 3D | Best way to start with 3D
It’s been a while since I done 3D stills and animations and 3D Blender seems to be perfect software to start, even if you have zero experience. I have to […]






