Тёмный

Resolve Route Guard - Angular (Tutorial #27) 

Nisha Singla
Подписаться 32 тыс.
Просмотров 20 тыс.
50% 1

Resolve Route Guard in Angular - Tutorial no. 27
Resolve Route Guard in Angular allows us to provide the needed data for a route before the route is activated
Use this link to share this video : • Resolve Route Guard - ...
Resolve Route guard is very useful in such situation where data for component is very critical and we don't want to land on view with partial Data.
To use Resolve router guard or Resolver we need to create guard which will implement Resolve interface and Resolve interface will give one method to override called resolve. So now if component's data can come from any source (from mock data, or http API or service ) this resolve method will handle that. Then this Resolver or Resolve guard we will apply to our route using resolve property , and this resolve property will be a object which will take key: value .Here, the key will be your property name which need to call in component to get data and value will be the Resolver Name.
resolve: {
data: ResolveGuard
}
Now to access this data in component we need to do Dependency Injection and inject ActivateRoute . This activateRoute will give us data property to access the resolve key(data)
this.activateRoute.snapshot.data['data']
You can also visit my following videos:
CanActivateRouteGuard: • CanActivate Route Guar...
CanActivateChild Route Guard: • CanActivateChild Route...
Nested Routing: • Nested Routes - Angula...
Router Parameters: • Route Parameters - Ang...
Routing: • Routing - Angular (Tut...
Angular Tutorial Series:
• Introduction- Angular ...
Follow me on:
►RU-vid : / nishasingla
►Facebook : / angularjs4beginners
►LinkedIn : / nishasingla
Telegram :t.me/angulartech

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

 

14 май 2020

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 58   
@shivaram1726
@shivaram1726 3 года назад
Thank you very much, Nisha and I must say your teaching style is crisp and clear. It helped me to get a good understanding of angular.
@NishaSingla
@NishaSingla 3 года назад
Thanks
@anjaneyuluaavula7422
@anjaneyuluaavula7422 3 года назад
The videos are really good . I have leaned a lot. Thank you. Curious to know if you are still continuing to do more videos on Angular. Please let us know.😀
@myvue4587
@myvue4587 4 года назад
Excellent, Cristal clear, thank you so much.
@NishaSingla
@NishaSingla 4 года назад
Thank you 😊
@vupham5252
@vupham5252 Год назад
very easy to understand! thank you so much!
@asimsheikh3511
@asimsheikh3511 Год назад
any way we can display a loader icon for the delay time ?
@sj1997
@sj1997 Год назад
mam trust me you're among the best teacher on youtube like i've watched other tutorials also but the way you explain things is amazing all the very best for your future keep uploading content trust me you can reach sky just by teaching angular
@sairampatibanda
@sairampatibanda 3 года назад
Hi Nisha. You explained the Angular concepts very clearly. I looked and practiced all the videos. It really helped me.
@NishaSingla
@NishaSingla 2 года назад
Glad to hear that
@rahulrahul6259
@rahulrahul6259 Год назад
Nice explanation thanks !!!
@priyarenjith2850
@priyarenjith2850 3 года назад
Hi Nisha ..I saw your video on route guard in angular today..well explained .thanks
@muhammadgul1049
@muhammadgul1049 2 года назад
Keep it up
@janarpriyanka7918
@janarpriyanka7918 3 года назад
Waiting for your Next Uploads :D, the best Angular Tutorial i had ever seen ... Please upload Angular -->Export to Excel using service and using Angular with ag-grid library
@ashwanikumar183
@ashwanikumar183 2 года назад
export to excel is very easy feature just needs to install npm dependencies n you are good to go with.
@konadeepak9443
@konadeepak9443 4 года назад
Thank you with this I completed your lectures
@NishaSingla
@NishaSingla 4 года назад
Good to know 😄
@prasadhkokkiligadda7449
@prasadhkokkiligadda7449 4 года назад
I'm learning angular from ur. Your RU-vid channel thanku
@NishaSingla
@NishaSingla 4 года назад
Good to know that its helping you . Keep learning 😊
@vedhalokanadham9254
@vedhalokanadham9254 3 года назад
i'm waiting for your next uploads...
@muralimanohar2514
@muralimanohar2514 4 года назад
wow you are back
@NishaSingla
@NishaSingla 4 года назад
😊😊
@chandukanth6875
@chandukanth6875 2 года назад
superb........ beauty with brains
@NishaSingla
@NishaSingla 2 года назад
Thanks
@pankajsah4485
@pankajsah4485 4 года назад
It's really helpful.
@NishaSingla
@NishaSingla 4 года назад
Good to know . Thanks
@vishalpal8957
@vishalpal8957 2 года назад
simple and sorted thanks
@NishaSingla
@NishaSingla 2 года назад
Thank you 😊
@rajeevkalangi2472
@rajeevkalangi2472 2 года назад
Wonderful Ma'am... I got what I'm looking for...
@NishaSingla
@NishaSingla 2 года назад
Glad to know 😀
@IqbalAhmed-qk5ix
@IqbalAhmed-qk5ix 3 года назад
Awesome NIce Explaination Thank u so much mam
@NishaSingla
@NishaSingla 3 года назад
Most welcome 😊
@brandon400
@brandon400 7 месяцев назад
thanks
@akshaysethia6879
@akshaysethia6879 3 года назад
Can you help in adding a loader while the resolve is fetching the data ?
@rayganmudberry375
@rayganmudberry375 3 года назад
hi nisha, your tutorials are awesome. please make one video crash course on anuglar 10 and please start complete angular project. that will be more help to understand anugular. thank you
@sachinkumarverma3552
@sachinkumarverma3552 3 года назад
gadha hai tu
@trustingod0
@trustingod0 2 года назад
I was wondering if Interfaces in Angular are used the same way they are used in C#. Maybe a short video over oop in Angular because it seems to be very object oriented with reusable classes.
@saikumarmogilla450
@saikumarmogilla450 3 года назад
Hi nisha, please explain difference between angular versions.
@amitt4208
@amitt4208 4 года назад
Hi Nisha, Thank you for these video very much helpful. Are you sharing code all these angular project in any link?
@akashsamanekar1877
@akashsamanekar1877 3 года назад
what if I want different data in different component? can we use same resolve for all ?
@abhiktzp
@abhiktzp Год назад
Thanks for this video. I have a route that passes an id. How to get that id in resolve guard?
@saikumarmogilla450
@saikumarmogilla450 3 года назад
Hi Nisha, Please explain tdf forms and reactive forms
@sabyasachidas2993
@sabyasachidas2993 2 года назад
Don't we need subscribe method too? As without subscribe how can you get the asynchronous data ?
@yelendisuresh7627
@yelendisuresh7627 2 года назад
Can you please make a video on ngrx , angular videos are awesome
@chinnamnaidusiriki19
@chinnamnaidusiriki19 2 года назад
Hi, Nisha simple and clear thanks for the video. I have one doubt on this, what if we call the post method by passing some parameters like "user_id","student_id"(this is a separate api) help me on this?
@abhiktzp
@abhiktzp Год назад
I too have the same query. Did you get any solution to this?
@kushagragautam3979
@kushagragautam3979 3 года назад
pls create full series
@Akshita_k
@Akshita_k 4 года назад
When will be your next video.. we r waiting 🙂
@venkatvv5081
@venkatvv5081 3 года назад
can you please make the video on lazy loading and change detection
@NishaSingla
@NishaSingla 3 года назад
Sure
@ayushmannpattanaik4936
@ayushmannpattanaik4936 2 года назад
Ma'am learning process is best but sound is coming very loud it's hurt my ears so mic sound should be low.
@NishaSingla
@NishaSingla 2 года назад
Thanks for your suggestion, I will take care thanks 😊
@TechnicalNikhil808
@TechnicalNikhil808 4 года назад
Can you make video of forms
@NishaSingla
@NishaSingla 4 года назад
Sure
@TechnicalNikhil808
@TechnicalNikhil808 4 года назад
Plz make it's soon
@technossolution1077
@technossolution1077 4 года назад
ru-vid.com/show-UCRAZoOK6vb0a6Bupm5pNz5w
@ashokp5805
@ashokp5805 Год назад
very confused saying, be confident while teaching
@mhdip6453
@mhdip6453 Год назад
just realod the page then you will see a beautiful error.. 😇😇