Тёмный

Angular resolve guard 

kudvenkat
Подписаться 829 тыс.
Просмотров 43 тыс.
50% 1

In this video we will discuss Angular resolve guard with an example.
Healthy diet is very important for both body and mind. We want to inspire you to cook and eat healthy. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking.
/ @aarvikitchen5572
At the moment, when you navigate to the LIST route, only a part of the page loads first and after 2 seconds when the data becomes available that's when the page is updated with employee list.
You don't want to display a partial page to the user, while waiting for the data. Before we activate the LIST route and display the view template associated with the LIST route, we want to pre-fetch the data. Once the data is available, that's when we want to render the view template, so the end user does not see a partial page.
So in short, we want to delay rendering the routed component view template until all necessary data have been fetched.
To pre-fetch data for a route we use a route resolver. A route resolver can be implemented as a function or a service. In this video, let's implement the route resolver as a service. In a later video, we will discuss how to implement it as a function.
For the code snippets please refer to the text version of the video at the following link
csharp-video-tutorials.blogspo...
Slides
csharp-video-tutorials.blogspo...
Angular CRUD Tutorial
• Angular CRUD tutorial
Angular CRUD Tutorial Text Articles & Slides
csharp-video-tutorials.blogspo...
All Dot Net and SQL Server Tutorials in English
ru-vid.com...
All Dot Net and SQL Server Tutorials in Arabic
/ kudvenkatarabic

Наука

Опубликовано:

 

28 май 2018

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 27   
@321zipzapzoom
@321zipzapzoom 2 года назад
Grt explanation of Concept, I Just Implemented it in my Client Project last week!!
@sachin6873
@sachin6873 4 года назад
this video is crisp and to the point , exactly what I was looking for . thank you.
@vamshidharreddy3851
@vamshidharreddy3851 6 лет назад
when i see your tutorial,it is always not only provides content but also very inspirational
@sairk6174
@sairk6174 6 лет назад
Venkat Garu.. Thanks a lot sir.. GOD should give you a GOOD health for years together and keep us inspiring ..
@manoharanadimoolam3074
@manoharanadimoolam3074 2 года назад
Great Teacher
@williammoriarty660
@williammoriarty660 4 года назад
Thank you so much friend! Great tutorials!
@lijindurairaj2982
@lijindurairaj2982 5 лет назад
very helpful, GOD bless you
@DirectionerMallou
@DirectionerMallou 5 лет назад
thank you for the tuto , it works
@stevemurch3245
@stevemurch3245 3 года назад
Extremely well explained. Thanks
@dsk_999
@dsk_999 5 лет назад
Thank you very much
@jeffinj7707
@jeffinj7707 3 года назад
Awesome
@shalinisingh5198
@shalinisingh5198 5 лет назад
Will this code work for angular6.. route.snapshot.data['employeeList] part?
@loyalindian2380
@loyalindian2380 5 лет назад
Heyy...can we use the same method route with canActivate for post API ?
@ottocheley7852
@ottocheley7852 6 лет назад
how can I work with a resolver which I have query params, that later I pass to another service that returns an Obserable with the data requested and in which this query params will change?
@shubhamtarkar38
@shubhamtarkar38 6 лет назад
Any plans for react tutorials????
@manusingh66
@manusingh66 5 лет назад
Good tutorial. How can we use resolver with lazy loading?
@AbdulHannan-kx3xu
@AbdulHannan-kx3xu 6 лет назад
Could you please post a video on how user idle service works? If user is idle should rout to login page.
@PrashantSedhainOfficial
@PrashantSedhainOfficial 4 года назад
Love you 😘
@vamshidharreddy3851
@vamshidharreddy3851 6 лет назад
plz provide react tutorials also
@developmentexpert666
@developmentexpert666 4 года назад
How can I call multiple API in resolve?
@rajeshpanwar5851
@rajeshpanwar5851 4 года назад
Is there a reason why here data fetching logic is written in constructor instead of nginit method?
@neerajsingh769
@neerajsingh769 6 лет назад
Please upload some video on advance internet technologies and web security based on java , servelets, ejb etc. Including xml...thanx
@elderofzion
@elderofzion 5 лет назад
why would you want to learn servlets and ejb? legacy stuff
@rajkathal3251
@rajkathal3251 6 лет назад
Hi Sir, Thanks for uploading this video, but problem that I am facing in my current project , how can i call multiple web api call with flatmap in the resolver class. I assume you understood my question and I am unable to find a way to fix this issue. For example : I am calling multiple webservices in my service class in my onItnit function , and I have to use flatmap so that onc serivce which is expecting some value from other web api and return the multiple service response in the form of array for ex : OnInit Method : this._mySerivces.getDataForInitialPageLoad(). subscribe((data) => this.orgunitsModel = data[0]; this.consoleModel = data[1]; this.planModel = data[2]; ) Service Class : getDataForInitialPageLoad() { return this._http.get(rest/orgunits/) .map((response: Response) => response.json()) .flatmap((orgUnits: OrgUnitModel[]) => { return Observable.forkJoin( Observable.of(orgUnits), this._http.get(rest/console/+ orgUnits[0].id) .map((response: Response) => response.json()) this._http.get(rest/plan/+ orgUnits[0].id) .map((response: Response) => response.json()) ) }) } How Can I create Resolves class for this kind of issue I know this is quite complex, but this is the biggest issue which most of the people would be faceing.
@JudenB2
@JudenB2 5 лет назад
did you find the solution Sir ?
@rajkathal1991
@rajkathal1991 5 лет назад
yes I found
@JudenB2
@JudenB2 5 лет назад
Raj Kathal tell me how é_è
Далее
Angular router navigation events
4:49
Просмотров 20 тыс.
Angular content projection
15:38
Просмотров 36 тыс.
impossible to understand how😨❓
00:14
Просмотров 2,5 млн
Resolver Guard in Angular Router (2021)
16:24
Просмотров 27 тыс.
Angular component input property change detection
12:18
Angular route guards
12:46
Просмотров 83 тыс.
Resolvers in Angular | Angular 15 | Angular Routing
17:11
Google Data Center 360° Tour
8:29
Просмотров 5 млн
Angular pure pipe
11:03
Просмотров 34 тыс.
Handling angular resolver errors
12:13
Просмотров 20 тыс.