Тёмный
No video :(

Angular Tutorial - 25 - Route Parameters 

Codevolution
Подписаться 659 тыс.
Просмотров 377 тыс.
50% 1

📘 Courses - learn.codevolu...
💖 Support UPI - support.codevo...
💖 Support PayPal - www.paypal.me/...
💾 Github - github.com/gop...
📱 Follow Codevolution
+ Twitter - / codevolutionweb
+ Facebook - / codevolutionweb
📫 Business - codevolution.business@gmail.com
Angular | Angular Tutorial for Beginners | Route Parameters in Angular

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

 

26 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 152   
@sandoc123
@sandoc123 5 лет назад
CodeEvolution Team Thank you so much for this series on Angular Tutorial 7. I have been learning so much from your videos. Very detailed tutorial with right examples. The order of topicsThe brief introduction about each concept before jumping in to examplesChoosing the right examples Giving away information only that is needed without overwhelming the learnerGood practices, recommendationsAnd above all ..all for free for people who cannot afford for online courses.Amazing!! Thank you for taking so much time to put everything together. I see there is so much work behind this!Thank you!
@sreeramreddyvelagala6952
@sreeramreddyvelagala6952 2 года назад
If anyone's facing a problem with this error: Error: src/app/department-detail/department-detail.component.ts:17:23 - error TS2345: Argument of type 'string | null' is not assignable to parameter of type 'string'. Type 'null' is not assignable to type 'string'. Use this: parseInt(this.route.snapshot.paramMap.get('id') as string) instead of this: parseInt(this.route.snapshot.paramMap.get('id')) can't explain the theory behind this, but it works for current versions
@AHari-uu1tn
@AHari-uu1tn 2 года назад
broo thank you so much
@Kiwi_the_shihtzu
@Kiwi_the_shihtzu Год назад
thank you
@saikadali7779
@saikadali7779 Год назад
thank you
@hardikrana5946
@hardikrana5946 Год назад
You solved my error. Thank you brother. 😊
@ceddh15
@ceddh15 Год назад
thanks bro
@_Rand0mStalker
@_Rand0mStalker 6 дней назад
Dude, thank you for this useful video without “extra water”
@vittorio9449
@vittorio9449 5 лет назад
I don't understand a thing. How did you do to make the names clickable? I did the same thing that you did in the video but nothing. Did you modified the app.component.html? Please someone answer me.
@iancarr3923
@iancarr3923 5 лет назад
I am working through all the videos in this series. Your delivery is excellent!
@TheShbh2011
@TheShbh2011 3 года назад
parseInt(this.route.snapshot.get('id') always get error but when removing parseInt no error comes but data not displayed after passing id in url , page not found open, but in console data comes
@gopalg980
@gopalg980 6 лет назад
Watching these videos at 1.25x speed really helps ... :) Thanks for good tutorials
@simpleway2022
@simpleway2022 5 лет назад
I usually listen at 1.5x xD
@lxdzii
@lxdzii Год назад
i finally get it... this part took a little longer to understand!
@ninosalkaton4461
@ninosalkaton4461 4 года назад
the best explanation ever, i have a question: what is the difference between : this.departmentId = parseInt(this.route.snapshot.paramMap.get('id')); and this.route.paramMap.subscribe(params => { this.departmentId = params.get("id") }) thank you
@jacques_ev4712
@jacques_ev4712 2 года назад
ayo Ninos, do you know the difference already? :c
@EvilInsideYEA
@EvilInsideYEA 2 года назад
Difference is the second one works in Angular 9 x)
@carlosfabio2
@carlosfabio2 6 лет назад
Very very very good, my friend! God bless you and your family!
@anjasmaradwissetiadi326
@anjasmaradwissetiadi326 5 лет назад
hello, thank for Vishwas because your video i can learn about angular. maybe i just suggest for you, you can give subtitles english on your videos. because I am not fluent in English and i think have people like me, little confused. i hope you or somebody can help add subtitles on your videos. i feel this channel help me and thanks for Vishwas. Good Luck !!!
@famahelene_
@famahelene_ 5 лет назад
Hi. Thank you for the video. Great one. But what if I need to use two parameters?
@bipinsinghrawat4695
@bipinsinghrawat4695 4 года назад
Changing navigation on same component but data is not getting change.
@ChanoTSG
@ChanoTSG 4 года назад
thanks for your tutorials, ver nace im learning a lot
@javiergg5977
@javiergg5977 5 лет назад
can u enable auto-subtitles for this video? the first 24 videos they have :D
@abhaydhars
@abhaydhars 4 года назад
Angular 8 Tutorial - 25 - Route Parameters : Why do we need to restart nodejs/angular when we use activated route , AOT or hot reload doesnt work when we are using activated route
@shantanu9433
@shantanu9433 6 лет назад
Awesome Video Tutorials for Angular Beginners. Easy to understand. Thanks Vishwas.
@suvendubiswal6820
@suvendubiswal6820 Год назад
Accurate 100% that I was looking for... Thank you
@piyushsharma5373
@piyushsharma5373 5 лет назад
This is the best tutorial of angular 7 I have ever seen
@malinmalindic8582
@malinmalindic8582 4 года назад
Without a doubt, the best Angular tutorials , but I wonder if such a mechanism exists in the Wordpress system, it reminds me on Blog page with all its posts.
@esakkis9727
@esakkis9727 5 лет назад
Why can't we directly use routerLink="['departments',department.id] in the department-list, instead of using click event. Please clarify
@vanzinvestor
@vanzinvestor 5 лет назад
can use 2 method 1. route navigate by programmatically show in this video onSelect(department: any) { this.router.navigate(['/departments', department.id]); } 2. route navigate by syntax [routerLink]="['departments',department.id]
@abdillahfahime6194
@abdillahfahime6194 3 года назад
you helped me so much , many thanks for you man
@ndmaru8518
@ndmaru8518 3 года назад
Completely understand. Thank you!
@JunaidKhan-zm2ce
@JunaidKhan-zm2ce 6 лет назад
This is an excellent tutorial thanks
@srinivaspatnala696
@srinivaspatnala696 3 года назад
Thank you for the video. Great one
@vntmadan
@vntmadan 4 года назад
why did you not use this.departmentId = parseInt(this.route.snapshot.paramMap.get('id'));
@X-AEA-12
@X-AEA-12 2 года назад
How do you past the rest of the properties to display on the department detail component?
@someshnukala804
@someshnukala804 4 года назад
Thank you so much sir. Great explanation. Kudos
@thegamerz5034
@thegamerz5034 Год назад
Amazing content, thanks!
@johnlauricefarmaccount8014
@johnlauricefarmaccount8014 2 года назад
thank you it really helps
@souvikc37
@souvikc37 3 года назад
Argument of type 'string | null' is not assignable to parameter of type 'string'. Type 'null' is not assignable to type 'string'. let id = parseInt(this.route.snapshot.paramMap.get('id')); Getting error. Can anyone help?
@himanshubalodi3941
@himanshubalodi3941 3 года назад
this.route.paramMap.subscribe(params => { this.departmentId = params.get("id") })
@sanketmane4026
@sanketmane4026 3 года назад
this will work ........ let id = Number(this.route.snapshot.paramMap.get('id'));
@hajarelmajid6842
@hajarelmajid6842 2 года назад
THANKSSSSSS@@sanketmane4026
@thejasiliemetha6350
@thejasiliemetha6350 2 года назад
@@sanketmane4026 was facing the same problem, thank you, your solution has fixed it. I'm still curious why parseInt does not work in this particular situation though.
@vishtrinity
@vishtrinity 4 года назад
am not able to understand why wud u need an ID for the department when it already has a distinct name...kindly clarify. what would be the practical application of this ?
@lexiaontube
@lexiaontube 6 лет назад
paramMap doesn't work for me and neither parseInt as used in the video (requires @param s (A string to convert) , radix (A value between 2 and 36))
@milanzivanov6279
@milanzivanov6279 6 лет назад
const id = parseInt(this.route.snapshot.paramMap.get('id').toString(), 10); this.departmentId = id;
@thanho7479
@thanho7479 6 лет назад
Thank you very much! But you can enable auto subtitles for all videos in Angular 6 Tutorial
@vik8860
@vik8860 3 года назад
Can you use router to create a link that dynamically points to rest api in back end? for example in case of a put request?
@harshamandloi394
@harshamandloi394 Год назад
can't display the department list code are same as you right
@abdullahhamzan2159
@abdullahhamzan2159 Год назад
I have problem router with params, can you help me to solve problem with message error "NG04014: Invalid configuration of route '/departement/:id': path cannot start with a slash"
@ayoubanbara1685
@ayoubanbara1685 4 года назад
thanks, you have a good voice
@vishalanand2936
@vishalanand2936 5 лет назад
Good one realy nice .. my kind of person understand easily. Thanks alots
@vinothkumars7421
@vinothkumars7421 4 года назад
HI Sir, Can you tell me how you were able to make the array of departments in the department-list component as clickable? I can only able to see the plain text. It is not clickable.
@karandeepkamboj3787
@karandeepkamboj3787 4 года назад
(click)="onSelect(department)" this is making it clickable
@GeorgeWurthmann
@GeorgeWurthmann 4 года назад
Thank you! Helped me alot!
@viktorlernt6063
@viktorlernt6063 4 года назад
Thank you very much, helped me a lot!
@user-bk6qj7wo6n
@user-bk6qj7wo6n 5 лет назад
شكرا جدا
@houseservice636
@houseservice636 3 года назад
What if you want to put the name instead of the id?
@pavak7539
@pavak7539 2 года назад
Hello sir. I am getting an error saying Parameter 'department' implicitly has an 'any' type. If I put department: any, then its showing blank. Please help.
@havefun5519
@havefun5519 5 лет назад
Hey, some route attribute that if the current page is home, show 'abc', if it's department page, show 'efg'?
@yosiefberhe4974
@yosiefberhe4974 3 года назад
How do i route to a new page without the old contents on it?
@vjoshiscs
@vjoshiscs 6 лет назад
Pls make video on login authontication
@Prakash8083
@Prakash8083 5 лет назад
Login authentications is simple. You can use Bearer Token based authentication. And you call it using /token with username & password and access data thourgh api using the toekn
@shreyjain3562
@shreyjain3562 5 лет назад
Thank you for the excellent tutorial
@babacar221
@babacar221 5 лет назад
Thank's for this tutorial; how to pass other parameter like name etc...? if anyone know the answer?!
@spectrefzier4626
@spectrefzier4626 5 лет назад
replace the word "id" with "name" in all the places except the array
@arnabdas7145
@arnabdas7145 4 года назад
how to pass more info like whole new page? not like id and new extra lines..
@ahsanbaloch9126
@ahsanbaloch9126 6 лет назад
but when we enter localhost:4200/departments/6 it also works. how to restrict that if we put wrong id in Url then it show page not Found instead of showing department detail works.
@Prakash8083
@Prakash8083 5 лет назад
Its because your route is correct. You need to check into your code if department id with 6 exists in the database. If not then redirect to not found
@abdulhadilababidi8052
@abdulhadilababidi8052 5 лет назад
@@Prakash8083 how can i do that?
@pkbaweja007
@pkbaweja007 6 лет назад
What about of other value of same I on detail page?? Like "name, age"....
@Prakash8083
@Prakash8083 5 лет назад
this.router.navigate(['game', { queryParams: {width:width, height:height}}]
@lonelynik
@lonelynik 4 года назад
How to get all the details of selected ID in detail page ?
@SofianMW
@SofianMW 5 лет назад
awesome merci
@karthikeyanns843
@karthikeyanns843 4 года назад
hey your CSS file is empty is the GIT HUB REPO, kindly provide it
@ritsk4338
@ritsk4338 6 лет назад
Awesome video. Can you please explain why colon ':' is required before id placeholder
@gargraghav1234
@gargraghav1234 6 лет назад
it means compulsory . for optional we write :id?
@rahulmathew8713
@rahulmathew8713 5 лет назад
Awesome video thank you so much
@khaledmohsen2724
@khaledmohsen2724 3 года назад
good tutorial awesome man
@deepakdagar_change_is_in
@deepakdagar_change_is_in 6 лет назад
Nice videos . Can you please post some on cascasding interceptors and doing error hadling and authentication and authorization in them..
@aheteshamshaikh9743
@aheteshamshaikh9743 3 года назад
First of all thanks for this awesome tutorial, I have tried this code and it's working on localhost only, Not working on a live server. any idea?
@anavaratha7020
@anavaratha7020 4 года назад
everything is ok witrh one parameter but how to pass two parameter, as u have name 'n' age in json file, how to display those . please make a video or tel us shortly
@wsxx69
@wsxx69 4 года назад
can u enable auto-subtitles for this video?
@PremKumar-lc1hi
@PremKumar-lc1hi 5 лет назад
Awesome tutorial thank you...
@harkiratsingh9071
@harkiratsingh9071 3 года назад
I am not able to click on angular mongodb etc please help me itsurgent
@manikantanomula3096
@manikantanomula3096 5 лет назад
Excellent bro
@sagarlodh6491
@sagarlodh6491 3 года назад
am getting the errorat point 3:47 as : 1] unexpected closing tag 2] opening tag not terminated. please any1?
@himanshubalodi3941
@himanshubalodi3941 3 года назад
just restart vs code
@seemazanvar9323
@seemazanvar9323 2 года назад
Please make series on Angular 12
@learnwithankit3582
@learnwithankit3582 Год назад
How to write that css?
@scottsmyth3251
@scottsmyth3251 4 года назад
Thank you !
@riddhipatel2578
@riddhipatel2578 4 года назад
Thanks for video i have learned a lot from this playlist I have one doubt.. you have used navigate method i have done same with routerlink (dynamic binding [routerLink] ="['department', department.id]" ) Its working same Could you please let me know what is difference between these two
@vanipentyala2116
@vanipentyala2116 Год назад
There is no major difference.if you have some complex logic in typescript file and do navigate go for navigate otherwise you just use routerLink in html
@Federation1323
@Federation1323 3 года назад
You saved my weeks)))
@saurabhsuman4960
@saurabhsuman4960 5 лет назад
items and badge class is not working for Angular 6/7. I see that the replacement is "badge badge-primary" and "list-group" but you got click functionality.. which is not happening in my case.
@Codevolution
@Codevolution 5 лет назад
CSS is not part of Angular versions. Make sure you have the CSS copied from the github repo.
@josefam20
@josefam20 5 лет назад
@@Codevolution I have the same issue so, do you mean to copy the original Bootstrap CSS from github into the angular application style file? or is there any other style file in specific that you are using? cause I have imported the bootstrap css file but the list does not look like yours, I can not even click on it :/ Thanx!
@sridhars9161
@sridhars9161 2 года назад
I'm getting an error as template parse error.
@sairammullapudi6658
@sairammullapudi6658 3 года назад
What is the purpose of keyword snapshot
@IvanProsic
@IvanProsic 6 лет назад
Thank you very much
@shubhambhure8171
@shubhambhure8171 4 года назад
I am getting this error: property 'snapshot' doesn't exist on type "typeOf ActivatedRoute" how to solve this issue. plz help
@IronMan-wz8dx
@IronMan-wz8dx 4 года назад
I would suggest checking for typos or property. Check your import, constructor, and method of the page using it.
@MrAlliqator
@MrAlliqator 5 лет назад
how i can send all data to detail page?
@xhonato5685
@xhonato5685 5 лет назад
You can do that with a service. Google it :)
@AmiraMahmoud7
@AmiraMahmoud7 5 лет назад
Thank you so much
@AmanNidhi
@AmanNidhi 6 лет назад
do you recommend to watch your old playlist on angular2?
@Codevolution
@Codevolution 6 лет назад
Watch it for the forms tutorials as they are pretty much the same and I will not cover that in this series.
@diego.coder26
@diego.coder26 4 года назад
in a real application is it good to show the id of the objects?
@ThePainkiller347
@ThePainkiller347 4 года назад
Very generic question with many possible answers. If you are displaying items to user, he/she can refer to id when communicating with you. If you have not secured your services enough, it does not matter for hacker if you hide id from him - and you will most probably complicate your life. Surely, you can expose some long hash instead of id, (hacker will still know unique identification of that item), but you will make "brute force" attack not much funny - and that can also be made less funny by limiting requests count for stupid example. So it is nor good, nor bad, highly dependant on many factors.
@VaVathana-co3nh
@VaVathana-co3nh 4 года назад
let id= parseInt(this.route.snapshot.paramMap.get('id')) in the same part If I want to parse String "name " how can I do? please help
@simon_situ
@simon_situ 4 года назад
let name = this.route.snapshot.paramMap.get('name')
@hajarelmajid6842
@hajarelmajid6842 2 года назад
It didn't work for me, I got {{departmentId}} dispalyed like this in the screen
@hajarelmajid6842
@hajarelmajid6842 2 года назад
oups I just missed one }
@RastafarTV
@RastafarTV 3 года назад
Good video
@ToDeoS
@ToDeoS 6 лет назад
How to set it to redirect to PageNotFound when accessing localhost:4200/departments/6?
@Prakash8083
@Prakash8083 5 лет назад
Its because your route is correct. You need to check into your code if department id with 6 exists in the database. If not then redirect to not found
@abhishekbhardwaj7684
@abhishekbhardwaj7684 6 лет назад
angular 6 was released on march, how did you get in Jan for tutorials ?
@akhilsuresh9536
@akhilsuresh9536 6 лет назад
He have already said that this is actually ang 5 but inorder to get the most out of the videos, he have given it the title of 6
@loco7051
@loco7051 2 года назад
Gracias que compre mi tarjeta 1060 6GB antes de la crisis me salio en 4500 mxn
@pudulls
@pudulls 6 лет назад
How can I pass an object? 🤔
@user-oo2xe2eu2e
@user-oo2xe2eu2e Год назад
Does anyone knows how to change the parameters as name selected instead of the id? I have tried the following method with no error but but nothing shows. onSelect(department) { this.router.navigate(['/departments', department.name]); } public departmentId=""; ngOnInit() { this.departmentId = this.route.snapshot.paramMap.get('name'); }
@viniciuslublanskiferreiral5406
@viniciuslublanskiferreiral5406 4 года назад
You should show the style.css file
@anasfarih
@anasfarih 5 лет назад
You're the Best
@dishantvashistha2038
@dishantvashistha2038 4 года назад
Zabardust Master Ji
@simpleway2022
@simpleway2022 5 лет назад
Great
@bilaldev6770
@bilaldev6770 5 лет назад
I've got a question please: I tried to get the name too but *const name = this.route.snapshot.paramMap.get('name');* didn't work, I get *null* in the console and I don't know why. Thank you for this amazing series!
@mitetaskov19
@mitetaskov19 5 лет назад
const statement values can be assigned once and they cannot be reassigned so i would use let for the id value because the value of id can be changed very easy
@TheBodysome
@TheBodysome 5 лет назад
If anyone is getting weird css errors you can try editing the .item .badge by adding flaot: left; (and removing display: inline-block;)
@alexandersantosablaza7033
@alexandersantosablaza7033 3 года назад
Argument of type 'string | null' is not assignable to parameter of type 'strin g'. i used all your service tutorial from there add this public employees: Array = []; public departmentId; constructor(private _employeeService:EmployeeService, private _activeRoute:ActivatedRoute) { } ngOnInit(): void { let id = parseInt(this._activeRoute.snapshot.paramMap.get('id')); this._employeeService .getEmployees() .subscribe(data => this.employees = data); }
@irenazlo5173
@irenazlo5173 2 года назад
After this video i feel my iq growed for 10 more
@sridhars9161
@sridhars9161 2 года назад
Can anyone help me out?
@dailyproviders5606
@dailyproviders5606 6 лет назад
which book you recommend for angular?
@devenshah3653
@devenshah3653 4 года назад
his videos are better than books.
@vijaysachdeva6147
@vijaysachdeva6147 5 лет назад
please add subtitles
Далее
Angular Tutorial - 26 - paramMap Observable
6:37
Просмотров 224 тыс.
Angular Tutorial - 23 - Routing and Navigation
12:51
Просмотров 927 тыс.
Ajdarlar...😅 QVZ 2024
00:39
Просмотров 267 тыс.
А ВЫ УМЕЕТЕ ПЛАВАТЬ?? #shorts
00:21
Просмотров 880 тыс.
Route Parameters - Angular (Tutorial #21)
14:40
Просмотров 33 тыс.
microsoft doubles down on recording your screen
10:00
Angular Tutorial - 27 - Optional Route Parameters
7:41
Angular Tutorial - 21 - Fetch Data Using HTTP
8:36
Просмотров 790 тыс.
Angular 18 is EXACTLY what we needed
9:15
Просмотров 74 тыс.
Angular Tutorial - 22 - HTTP Error Handling
5:26
Просмотров 357 тыс.
CanDeactivate Route Guard - Angular (Tutorial #26)
14:32