| Enable button through code after five seconds of page load in angular node js?
To enable button after 5 seconds in angular we need to do some code change in .HTML and .ts file as give below. Once page is load button will automatically enable in five seconds.
(1)Below code need to add in .ts file
constructor() {
setTimeout(() => {
this.allowNewServer = true;
}, 2000);
and below is the image for above code
(2)Below is the code need to apply on .HTML page to apply conditionon button as given below
[disabled]="!allowNewServer"
And below is the image for the same
| | |