In our previous video we discussed, detecting and reacting to INPUT property changes using ngOnChanges life cycle hook. In this video we will discuss doing the same using a Property Setter instead.
Text version of the video
http://csharp-video-tutorials.blogspo...
Slides
http://csharp-video-tutorials.blogspo...
Angular CRUD Tutorial
https://www.youtube.com/playlist?list...
Angular CRUD Tutorial Text Articles & Slides
http://csharp-video-tutorials.blogspo...
All Dot Net and SQL Server Tutorials in English
https://www.youtube.com/user/kudvenka...
All Dot Net and SQL Server Tutorials in Arabic
https://www.youtube.com/c/KudvenkatAr...
Detecting and reacting to Input property changes using Property Setter
// Private backing field for the property
private _employee: Employee;
// This property setter is called anytime the input property changes
// Notice the code here logs the previous and current employee names
@Input()
set employee(val: Employee) {
console.log('Previous : ' + (this._employee ? this._employee.name : 'NULL'));
console.log('Current : ' + val.name);
this._employee = val;
}
// This getter is called when reading and displaying data
get employee(): Employee {
return this._employee;
}
At this point you might be thinking, there are 2 ways to detect and react to Input property changes (Property Setter and ngOnChanges life cycle hook). What is the difference between the two and when to use one over the other. We will answer these 2 questions in our next video.
asp.net core docker Angular input change detection using property setter | |
105 Likes | 105 Dislikes |
17,812 views views | 524K followers |
Science & Technology | Upload TimePublished on 21 Mar 2018 |
Related keywords
wcf vs web api,ajax meaning,central park 5,asp.net core github,craigslist nj,wcf one piece,asp.net core 3,server status,ajax fc,ajax players,server jobs nyc,asp.net core swagger,credit karma,services group,asp.net machine account,server error in '/' application,servers for minecraft,asp.net core dependency injection,services windows,asp.net core 3.0,wcf ria services,services angular,calculator,ajax ontario,services google play apk,asp.net mvc tutorial,asp.net core 3 release date,server job description,servicenow,asp.net cos'è,services briefcase,asp.net core web api,ajax jquery,wccftech,craigslist ny,ajax call,asp.net core 2. guida completa per lo sviluppatore,asp.net core,server pro,server status ffxiv,asp.net zero,cheap flights,server memes,asp.net core hosting,services sas,services online,chase,serverless architecture,server resume,wcf c#,server books,services technologies gps,college football,ajax deadpool,server jobs,cvs,cnn,costco hours,asp.net web api,wcf service application,server side rendering,serverless,wcf soap,wcf cat,asp.net core download,cool math games,wcf test client,services & training hse colombia sas,servicestack,citibank,asp.net core identity,ajax parking,asp.net core logging,cunyfirst,ajax post,asp.net guida,wcf nba,services fms publish announcement,services.msc no abre,wcfi foundation,ajax jersey,wcf authentication,asp.net core razor pages,server duties,asp.net core environment variables,http://asp.net,server 2019,chernobyl,century 21,serverminer,ajax cleaner,services consultores,services consulting,services.msc,asp.net core configuration,ajax marvel,asp.net tutorial,asp.net mvc,asp.net core tutorial,wcfm,ajax roster,wcfs international curriculum,asp.net core mvc,ajax soccer,chase online,server hosting,wcf api,costco,wcfi,server jobs near me,ajax dish soap,capital one,server rack,craigslist,ajax tavern,ajax javascript,ajax request,wcf dragon ball,asp.net core 2.2,services desk,services transmission company sas,asp.net core signalr,services manager,ajax paving,ajax greek,asp.net identity,asp.net core middleware,wcf web service,asp.net download,services tag dell,wcf 2019 nba,wcf tutorial,
Không có nhận xét nào:
Đăng nhận xét