Angular 6 Basics 9 - Data binding and async

preview_player
Показать описание

In this video we'll use an async operation (`setInterval`) to dynamically update the date component's displayed value, so that it shows updates to the time value every second.

Angular 6 Basics - Learn how to create Angular applications from scratch. Understand the Angular framework and learn how to use the features of the framework to create components and services. Use modules to organise your code. Build applications that call REST APIs and fetch data from a server. Implement routing to show multiple views with multiple URLs.
This course requires no previous knowledge of Angular or AngularJS.
Рекомендации по теме
Комментарии
Автор

property needs to be set: dateMessage: string | undefined; to avoid this error: ' Property 'dateMessage' has no initializer and is not definitely assigned in the constructor'

marcholman
Автор

So angular is javaScript but without people debating weather or not it is a "TRUE" object-oriented language?

sarkasmt
Автор

How can i get some DOM information, if async comes undefined?

jonatasalmeida
Автор

will this code instantiate constructor again and again?

vipinsharma-zxcb
Автор

.toLocaleTimeString() is not giving time in AM /PM so please help

amargupta
Автор

When I tried to create a new method inside the component class and put the same functionality as mentioned in the fat arrow function, it is not recognizing this keyword. Why is it so?

constructor() {
setInterval(updateTime(), 1000)

}

updateTime(){
let currentDate = new Date();
this.dateMessage = currentDate.toDateString()+ ' '+
}


Can someone please answer this?

harikrishnhaa
Автор

I did the same thing as you, but got this error

Property 'dateMessage' has no initializer and is not definitely assigned in the constructor

manjeetverma
Автор

Hello professor.
Could you explain to me what 'this.' mean in this context? Thank you!

LeonardoMarcattidaSilva