Routing - Angular (Tutorial #20)

  Рет қаралды 41,591

Nisha Singla

Nisha Singla

Күн бұрын

Routing In angular application helps us to navigate across the components using client side navigation .
Kindly share this video : • Routing - Angular (Tut...
So far we have build component and we were displaying it in app.component.html but now we want to navigate from one component to another component when user click on any link .So as of now in my application I have created 3 component Users, about and contact .
And these components we can create using angular cli generate commands :
ng g c users
ng g c about
ng g c contact
But as of now if we want to call these components we will call it in app.component.html using custom tags .
We have created our layout using bootstrap navbar : getbootstrap.com/
Now instead of calling it like that we want to display particular component as per the client request .So we want to load users component here when the url is /users and about component will url is /about and same for contact component /contact
So this thing we can do using Routing in Angular . So the mapping of component with url will done through Routing and to implement routing ,we need to follow 3 steps:
1) Routes Configuration
2) router-outlet
3)Navigation to make is Single page application
Router Imports:
The Angular Router is an optional service that presents a particular component view for a given URL. It is not part of the Angular core. It is in its own library package, @angular/router. Import what you need from it as you would from any other Angular package.
import { RouterModule, Routes } from '@angular/router';
Configuration
A routed Angular application has one singleton instance of the Router service. When the browser's URL changes, that router looks for a corresponding Route from which it can determine the component to display.
Router-outlet
When the url will change it will load our route but where to load the component it will decide by directive router-outlet. Router-outlet acts like a placeholder for the components
RouterLinks
Now you have routes configured and a place to render them, but how do you navigate? The URL could arrive directly from the browser address bar. But most of the time you navigate as a result of some user action such as the click of an anchor tag.
If you liked my channel , subscribe to it and like my videos. For any queries ask you question in comment section
Subscribe to my channel : / nishasingla
Watch complete playlist here: • Introduction- Angular ...
Follow us on:
Facebook: / angularjs4beginners
LinkedIn: / nisha-singla-82407aa0
Website :
For more such interesting videos, please subscribe to our channel and stay connected.
If you face any problem how Routing works in Angular 5 then leave a comment below and let me know. I'll be happy to assist you.

Пікірлер: 66
@lakshmikanth4249
@lakshmikanth4249 3 жыл бұрын
your explanation is so crisp.. I don't have to watch it twice to understand. Thank you.
@NishaSingla
@NishaSingla 3 жыл бұрын
Glad to hear this, thank you 🙏 keep learning 😃😃
@lakshmikanth4249
@lakshmikanth4249 3 жыл бұрын
@@NishaSingla Please do videos on ReactJS as well.
@asifsongs
@asifsongs 2 жыл бұрын
Best of the best explanation, what a wonderful instructor. No one on youtube can close her. She is simply the best. Thank u so much, Nisha.
@indrasen9617
@indrasen9617 6 жыл бұрын
you are simply awesome ......explained everything so simply like a boss
@yuvaraj14598
@yuvaraj14598 3 жыл бұрын
Thank you madam simple and easy explanation 💯% understand madam
@NishaSingla
@NishaSingla 3 жыл бұрын
You are welcome 😊
@ranjithkumarm5687
@ranjithkumarm5687 7 ай бұрын
Great explanation. a Really wonderful job, and it's very easy to understand the concept the way you explain 👏👌💐
@balajius4271
@balajius4271 5 жыл бұрын
Awesome Explanation and smart and clear pronounsataion Mam.. The main intension is to understand the word's. u only did it..Good English Nisha..
@madhusatyam3074
@madhusatyam3074 3 жыл бұрын
exllent explanation medam really good job
@NishaSingla
@NishaSingla 3 жыл бұрын
Thank you so much 🙂
@syamveera6820
@syamveera6820 3 жыл бұрын
Thank you Nisha, amazing teaching.
@NishaSingla
@NishaSingla 3 жыл бұрын
🙏🙏
@thakurfitness7376
@thakurfitness7376 5 жыл бұрын
Very good Nisha. Thank you. You teach me abut routing very easily..
@abhi9074470124
@abhi9074470124 4 жыл бұрын
Super Explanation With Excellent Voice To Understand Kindly Upload Also Small And Big Project Of Angular
@NishaSingla
@NishaSingla 4 жыл бұрын
Hey Thanks :)
@joshibabu2005
@joshibabu2005 6 жыл бұрын
Where are these days? Excellent videos nisha
@Ramkirat1991
@Ramkirat1991 5 жыл бұрын
@ Nisha Singla where are you ? please upload more video on angular 5, you are simply awesome.
@kushaalrana
@kushaalrana 4 жыл бұрын
Explain on point Thank you for this wonderful video👌
@NishaSingla
@NishaSingla 4 жыл бұрын
Good to know 😃
@parvezmd6455
@parvezmd6455 3 жыл бұрын
madam, Do you have angular course on udemy,other platform
@rakeshjoshi2306
@rakeshjoshi2306 6 жыл бұрын
Thanks for this video. It really helped to understand angular routing. Please create a video related to UI-route third-party module vs angular 5 routing difference.
@kotireddy6467
@kotireddy6467 6 жыл бұрын
Hi Nisha , good teaching for all angular videos .. I have one dout..how can I navigate one page to onther page please help me
@vedhalokanadham9254
@vedhalokanadham9254 4 жыл бұрын
awesome explanation
@sourabhpandit6724
@sourabhpandit6724 5 ай бұрын
Superb Excellent
@sarkari-mahiti
@sarkari-mahiti 2 жыл бұрын
thank you so much 😊
@donaldli1864
@donaldli1864 4 жыл бұрын
Beautiful face, sweet voice and clear explanation.
@NishaSingla
@NishaSingla 4 жыл бұрын
thank you!
@saalimhussain6635
@saalimhussain6635 3 жыл бұрын
I have doubt How to route from login page to other page . For me it's showing below the login page . Where should I use router outlet for that If I click submit button , it should route to the other component , without showing the login page
@NishaSingla
@NishaSingla 3 жыл бұрын
Router outlet you need to keep in the layout component where you are expecting to render component based on route change
@saalimhussain6635
@saalimhussain6635 3 жыл бұрын
@@NishaSingla thanks
@rahulsingh-px6vo
@rahulsingh-px6vo 6 жыл бұрын
This is basic routing part continuing from Angulat 2, the main upgrades came to Angular5 are ActivationStart, ActivationEnd, ChildActivationStart, and ChildActivationEnd. Hope you will update soon.
@venkateshyadla9798
@venkateshyadla9798 6 жыл бұрын
thank you nisha
@NishaSingla
@NishaSingla 6 жыл бұрын
You’re welcome
@aqibferoz8576
@aqibferoz8576 6 жыл бұрын
u r doing a great job
@jprit1360
@jprit1360 6 жыл бұрын
I like your videos
@prathyubommana7453
@prathyubommana7453 2 жыл бұрын
thank you
@Sandeep-lb7wb
@Sandeep-lb7wb 4 жыл бұрын
Nisha can I expect videos on all router events and lifecycle hooks
@NishaSingla
@NishaSingla 4 жыл бұрын
Sure Sandeep. Will try to upload soon
@mohammadakramkhan9326
@mohammadakramkhan9326 5 жыл бұрын
Hi, Nisha ji i put bootstrap slider ,slick slider and other plugin expect the home page other page this plugin is not working on routing page so for what reason this not working. can you explain ?
@Harshaavolgos
@Harshaavolgos 6 жыл бұрын
Hi mam....can you please upload the vedio about the pagination concept ?
@shamsapkale6469
@shamsapkale6469 6 жыл бұрын
Really good jobs..!!
@NishaSingla
@NishaSingla 6 жыл бұрын
Thank you
@nari1874
@nari1874 6 жыл бұрын
Good explain madam..
@NishaSingla
@NishaSingla 6 жыл бұрын
Thank you
@narasimhareddy5713
@narasimhareddy5713 4 жыл бұрын
Hi i am getting problem that is not able to display the users details i am getting only users on browser in users navigation and users.component.html why we use users.length>0 else nousers
@shamsapkale6469
@shamsapkale6469 6 жыл бұрын
Hi ,Nisha Ji If You possible , plz upload lazy loading in angular 4 with Router Guards
@NishaSingla
@NishaSingla 6 жыл бұрын
I will try to do so... thank you
@jprit1360
@jprit1360 6 жыл бұрын
Please make one website that will contain all these property of angular5 mam
@shashankpandey1966
@shashankpandey1966 4 жыл бұрын
#subscribed... thankyou so much.
@NishaSingla
@NishaSingla 4 жыл бұрын
Thank you Shashank
@akshayshihora5851
@akshayshihora5851 6 жыл бұрын
all are angular serious is very good explain and i hope update new video for angular 5 and angular 6
@NishaSingla
@NishaSingla 6 жыл бұрын
Thank you
@ginny_ki_gang9964
@ginny_ki_gang9964 5 жыл бұрын
HI I have one question, when I am using router link my jquery is not working
@jprit1360
@jprit1360 6 жыл бұрын
Is this complete tutorial of angular5 mam
@angulardesign7412
@angulardesign7412 4 жыл бұрын
how to make landing page and (home after login) url same like localhost:8080 like facebook does facebooklogin page url facebook.com and profile url same facebook .com in angular plz help i m working on real project
@shaheennajma4253
@shaheennajma4253 Жыл бұрын
HI, does anyone have source code for the following code?
@MANDEEPSINGH-kg9fe
@MANDEEPSINGH-kg9fe 2 жыл бұрын
mam where is code of this video.plz share that also
@jayakumar2927
@jayakumar2927 3 жыл бұрын
Login logout how to add here right side
@drajay8671
@drajay8671 3 жыл бұрын
I love u
@codewithsingh7710
@codewithsingh7710 5 жыл бұрын
Routing is different in angular 7/8
@shashankpandey1966
@shashankpandey1966 4 жыл бұрын
No routing is same.
@jayakumar2927
@jayakumar2927 3 жыл бұрын
Routing error comes how to resolve share the code
@NishaSingla
@NishaSingla 3 жыл бұрын
I don’t have code with me as my system crashed n lost earlier data... what issue u r getting ?
Route Parameters - Angular (Tutorial #21)
14:40
Nisha Singla
Рет қаралды 34 М.
@ViewChild/@ViewChildren in Angular (Tutorial 35)
19:31
Nisha Singla
Рет қаралды 65 М.
She's very CREATIVE💡💦 #camping #survival #bushcraft #outdoors #lifehack
00:26
Incredible: Teacher builds airplane to teach kids behavior! #shorts
00:32
Fabiosa Stories
Рет қаралды 12 МЛН
🕊️Valera🕊️
00:34
DO$HIK
Рет қаралды 1,6 МЛН
Angular  Routing | LazyLoading | AuthGuard | multiple router-outlet |  all in one video
31:37
Technical Babaji (Tarique Akhtar)
Рет қаралды 193 М.
What’s new in Angular v18
20:08
Angular
Рет қаралды 128 М.
Services - Angular (Tutorial #17)
10:56
Nisha Singla
Рет қаралды 36 М.
CanActivate Route Guard - Angular (Tutorial #24)
11:58
Nisha Singla
Рет қаралды 38 М.
You might not need useEffect() ...
21:45
Academind
Рет қаралды 163 М.
RxJS Subject | What is RxJs Subject  - Angular (Tutorial 31)
10:29
Nisha Singla
Рет қаралды 45 М.
CanDeactivate Route Guard - Angular (Tutorial #26)
14:32
Nisha Singla
Рет қаралды 20 М.
Custom Pipe - Angular (Tutorial #16)
9:01
Nisha Singla
Рет қаралды 41 М.
NgTemplateOutlet in Angular - Everything You Have to Know (2022)
35:15
Decoded Frontend
Рет қаралды 51 М.
She's very CREATIVE💡💦 #camping #survival #bushcraft #outdoors #lifehack
00:26