Тёмный

Routing - Angular (Tutorial #20) 

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

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.

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

 

17 июн 2018

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 66   
@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.
@ranjithkumarm5687
@ranjithkumarm5687 3 месяца назад
Great explanation. a Really wonderful job, and it's very easy to understand the concept the way you explain 👏👌💐
@lakshmikanth4249
@lakshmikanth4249 2 года назад
your explanation is so crisp.. I don't have to watch it twice to understand. Thank you.
@NishaSingla
@NishaSingla 2 года назад
Glad to hear this, thank you 🙏 keep learning 😃😃
@lakshmikanth4249
@lakshmikanth4249 2 года назад
@@NishaSingla Please do videos on ReactJS as well.
@indrasen9617
@indrasen9617 5 лет назад
you are simply awesome ......explained everything so simply like a boss
@sourabhpandit6724
@sourabhpandit6724 2 месяца назад
Superb Excellent
@aqibferoz8576
@aqibferoz8576 5 лет назад
u r doing a great job
@thakurfitness7376
@thakurfitness7376 5 лет назад
Very good Nisha. Thank you. You teach me abut routing very easily..
@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.
@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..
@joshibabu2005
@joshibabu2005 5 лет назад
Where are these days? Excellent videos nisha
@vedhalokanadham9254
@vedhalokanadham9254 3 года назад
awesome explanation
@syamveera6820
@syamveera6820 2 года назад
Thank you Nisha, amazing teaching.
@NishaSingla
@NishaSingla 2 года назад
🙏🙏
@shamsapkale6469
@shamsapkale6469 6 лет назад
Really good jobs..!!
@NishaSingla
@NishaSingla 6 лет назад
Thank you
@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
@cartoonwalasudhir
@cartoonwalasudhir Год назад
thank you so much 😊
@abhi9074470124
@abhi9074470124 4 года назад
Super Explanation With Excellent Voice To Understand Kindly Upload Also Small And Big Project Of Angular
@NishaSingla
@NishaSingla 4 года назад
Hey Thanks :)
@yuvaraj14598
@yuvaraj14598 3 года назад
Thank you madam simple and easy explanation 💯% understand madam
@NishaSingla
@NishaSingla 2 года назад
You are welcome 😊
@Ramkirat1991
@Ramkirat1991 5 лет назад
@ Nisha Singla where are you ? please upload more video on angular 5, you are simply awesome.
@prathyubommana7453
@prathyubommana7453 2 года назад
thank you
@venkateshyadla9798
@venkateshyadla9798 6 лет назад
thank you nisha
@NishaSingla
@NishaSingla 6 лет назад
You’re welcome
@jprit1360
@jprit1360 6 лет назад
I like your videos
@madhusatyam3074
@madhusatyam3074 3 года назад
exllent explanation medam really good job
@NishaSingla
@NishaSingla 3 года назад
Thank you so much 🙂
@rahulsingh-px6vo
@rahulsingh-px6vo 5 лет назад
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.
@nari1874
@nari1874 6 лет назад
Good explain madam..
@NishaSingla
@NishaSingla 6 лет назад
Thank you
@donaldli1864
@donaldli1864 4 года назад
Beautiful face, sweet voice and clear explanation.
@NishaSingla
@NishaSingla 4 года назад
thank you!
@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 ?
@shashankpandey1966
@shashankpandey1966 4 года назад
#subscribed... thankyou so much.
@NishaSingla
@NishaSingla 4 года назад
Thank you Shashank
@Janasenaforever143
@Janasenaforever143 5 лет назад
Hi mam....can you please upload the vedio about the pagination concept ?
@ginny_ki_gang9964
@ginny_ki_gang9964 4 года назад
HI I have one question, when I am using router link my jquery is not working
@kotireddy6467
@kotireddy6467 5 лет назад
Hi Nisha , good teaching for all angular videos .. I have one dout..how can I navigate one page to onther page please help me
@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
@drajay8671
@drajay8671 3 года назад
I love u
@jprit1360
@jprit1360 6 лет назад
Please make one website that will contain all these property of angular5 mam
@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
@saalimhussain6635
@saalimhussain6635 2 года назад
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 2 года назад
Router outlet you need to keep in the layout component where you are expecting to render component based on route change
@saalimhussain6635
@saalimhussain6635 2 года назад
@@NishaSingla thanks
@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
@jprit1360
@jprit1360 6 лет назад
Is this complete tutorial of angular5 mam
@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
@shaheennajma4253
@shaheennajma4253 Год назад
HI, does anyone have source code for the following code?
@jayakumar2927
@jayakumar2927 3 года назад
Login logout how to add here right side
@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
@MANDEEPSINGH-kg9fe
@MANDEEPSINGH-kg9fe 2 года назад
mam where is code of this video.plz share that also
@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 ?
@codewithsingh7710
@codewithsingh7710 4 года назад
Routing is different in angular 7/8
@shashankpandey1966
@shashankpandey1966 4 года назад
No routing is same.
Далее
Route Parameters - Angular (Tutorial #21)
14:40
Просмотров 33 тыс.
Luiza Rasulova #luizarasulova
00:37
Просмотров 536 тыс.
What turned out better to repeat? #tiktok
00:16
Просмотров 1,5 млн
Resolve Route Guard - Angular (Tutorial #27)
8:47
Просмотров 19 тыс.
Nested Routes - Angular (Tutorial #22)
8:57
Просмотров 21 тыс.
CanActivateChild Route Guard - Angular (Tutorial #25)
10:56
HTTP Service - Angular (Tutorial #18)
7:02
Просмотров 32 тыс.
Directives in Angular Applications
25:13
Просмотров 178 тыс.
Angular Tutorial - 23 - Routing and Navigation
12:51
Просмотров 924 тыс.
@ViewChild/@ViewChildren in Angular (Tutorial 35)
19:31
Luiza Rasulova #luizarasulova
00:37
Просмотров 536 тыс.