How to route in Angular - Learning Angular (Part 5)

  Рет қаралды 89,060

Angular

Angular

Күн бұрын

Пікірлер: 55
@davidcooper4327
@davidcooper4327 Жыл бұрын
This dude is super positive. It makes me smile.
@rembautimes8808
@rembautimes8808 Жыл бұрын
I really like the content and presentation style. I tried my hand at Angular last year but gave up as I couldn’t get routing. This video gives me confidence to try it again.
@Linkario86
@Linkario86 23 күн бұрын
That was really helpful and while it takes a bit of practice to do all this myself, this is a great starting point and comprehensible reference! Love Mark's energy too!
@Dmitriy-p4y
@Dmitriy-p4y 9 ай бұрын
You guys should update the documentation, because I am struggling with Tour of Heroes where I have to follow other instructions that do not work on my Angular version
@guilllermomolinaavila9326
@guilllermomolinaavila9326 5 ай бұрын
I was stuck with the dynamic route, thanks a lot!
@Angular
@Angular 5 ай бұрын
Glad it was helpful
@Angular
@Angular Жыл бұрын
Watch more episodes of Learning Angular→ goo.gle/Learning-Angular
@marlosbross423
@marlosbross423 10 ай бұрын
This week, I started learning Angular and encountered some difficulty with the router. I consulted the documentation, but it wasn't until I came across a helpful video that I managed to navigate my pages successfully. However, I'm working with Angular 17 and I'm unsure if this approach is the best practice to use." tks for angular team and community.
@forton615
@forton615 Жыл бұрын
The tutorial I started with did not use standalone, so this doesn't work for my application. Do I have to start over again? This is frustrating.
@forton615
@forton615 Жыл бұрын
Update and a little rant: Migrated succesfully to standalone and I could follow along again (steps are well documented if you google). I tried this with another project that I did in a course a few years ago and it was a dependency nightmare, gave up on that one. If I'm correct the latest version of ngbootstrap is not up to date with the latest version of angular? I'm doing stuff with midi files, most of the libraries are old and outdated and need to be configured by hand. It's 2024 and it feels like web development is stuck in the dark ages (had a career in vfx for 24 years and I thought that was complicated stuff...)
@tejas_bajaj
@tejas_bajaj 6 ай бұрын
At 9:03, in Angular 18, need to import RouterLink instead of RouterModule
@JogandocomVini
@JogandocomVini 4 ай бұрын
i used routerModule and it worked, switched to RouterLink and also worked. Great to know that Angular doesn't break old versions
@Alexanderscodesamples-x4u
@Alexanderscodesamples-x4u 3 ай бұрын
Thank you for the video.
@oussemabouyahia474
@oussemabouyahia474 Жыл бұрын
i thought that angular dead comparing by react , fortunately three days ago you come up with this tutorial
@jediampm
@jediampm Жыл бұрын
Hi, few thins to point out: if you are using v16 and dont use the provide files, the config should be made in a file "call app.config.ts". instead of using "the main.ts" file - why not inject the deeps of router in the construtor instead of using inject function. what is the diff between inject as constructor params or using inject function? - in "routes.ts" why not just "export const ..." instead of export default and using naming import?
@0xac829
@0xac829 Жыл бұрын
I want to like Angular, but it confuses the crap out of me.
@javo5270
@javo5270 3 ай бұрын
@@0xac829 same, i am trying to do something with it for some weeks now and i watch so many tutorials but also read a lot of documentations, also started doing things myself but there are so many differences on many tutorials and docs, its so confusing and frustrating
@Guy-Scott
@Guy-Scott Жыл бұрын
I would recommend using Dependency Injection (DI) in a different way as shown in the tutorial. First, dependencies usually inject in the constructor rather then manually. Further I believe using the OnInit lifecycle (which is probably left out for simplicity) is often a better idea to do initialization then the constructor. This is my code: export class DetailsComponent implements OnInit { housingLocationId = 0; constructor(private route: ActivatedRoute) { } ngOnInit() { this.housingLocationId = Number(this.route.snapshot.params["id"]); }); } }
@generativestudio
@generativestudio Жыл бұрын
Routing setup does not seem to work, the moment I add "provideRouter(routeConfig)" in the providers array, I get a bunch of error messages one being "Argument of type '{ providers: (ComponentInputBindingFeature | EnvironmentProviders)[]; }' is not assignable to parameter of type '(CompilerOptions & BootstrapOptions) | (CompilerOptions & BootstrapOptions)[] | undefined'.", not clear what's the issue here because even the documentation is the same.
@ArmenJanamyan
@ArmenJanamyan Жыл бұрын
It seems you did the same error as me. Use providers: [ provideRouter(routeConfig) ] And not providers: { provideRouter(routeConfig) }
@dev_ameen2455
@dev_ameen2455 Жыл бұрын
Thank you I had the same issue! @@ArmenJanamyan
@albrough
@albrough Жыл бұрын
@14:06 you show the end of the string to be added and then move off making it difficult to complete the task without rewinding the video
@technovelodos
@technovelodos Жыл бұрын
For those wanting to see the cropped line at end: this.housingLocationId = Number(this.route.snapshot.params["id"])
@pogchamper228
@pogchamper228 Жыл бұрын
You solved my problem
@Flo22222
@Flo22222 5 ай бұрын
Well done explained. Not that what I looked 100% for but very interesting! Does the routerlink in the tag refresh the page and load or no?
@КонстантинСергеевич-ш6с
@КонстантинСергеевич-ш6с 10 ай бұрын
Love this guy)
@zeprincelini
@zeprincelini Жыл бұрын
Hello, great tutorial. My question is, why is the router setup so different from what I have when I add router while creating the project(ng new). Its so different and both yours and mine is angular 15.
@bertholdmaier7342
@bertholdmaier7342 9 ай бұрын
The anchor link works only in case you set the slash in front of the details: Learn More
@justzcross6236
@justzcross6236 7 ай бұрын
By having a non standalone app does it change?
@Eltopshottah
@Eltopshottah Жыл бұрын
Thank you Angular team!
@srdouglas1026
@srdouglas1026 10 ай бұрын
nesse caso o standalone está "false" ?
@viky293
@viky293 3 ай бұрын
Like the ENERGY !!
@Noname-i4f3z
@Noname-i4f3z 9 ай бұрын
How create routing if you have one Component where change :id and change load data from API?
@obijuank2009
@obijuank2009 Жыл бұрын
Amazing toturial for beginners
@graydhd8688
@graydhd8688 Жыл бұрын
Is this an outdated version of Angular?
@manojht8036
@manojht8036 Жыл бұрын
Yes
@nightsurvivor
@nightsurvivor 5 ай бұрын
Hi, I'm a beginner in Javascript. I'm still confused after finishing these great videos. I found another video for beginners like me in Angular and this is the link: kzbin.info/www/bejne/onrFkJqkocqIpNU . I've tried this part 5 and combined this part with it, and the result is awesome. I'm sorry, I don't mean to thumb down all parts of videos. I've already thumbed up your video, sir.. These videos are the ideal starting point for learning Angular and i'm trying to do my best. Thank you for the first impression that opened my mind to learn more about Angular. My journey will be great after this ! 😁
@adimardev1550
@adimardev1550 Жыл бұрын
i don't understand why you have to make everything too small when you have the entire blank screen for free. i can barely see a text even in full screen with 4k 14inch lap top. negative comments is positively necessary.
@Abhijit-techie
@Abhijit-techie 4 ай бұрын
the tutorial is too fast and many topics gathered at once...please break it down in small tutorials
@ohmegatech666
@ohmegatech666 3 ай бұрын
There are so many convoluted steps just to add the router which seems like basic functionality. Why is there not a CLI command to just add all that's required for the router? In fact why doesn't ng new add the router by default? Edit: Just looked it up and since version 17 ng new DOES include router by default. Good job Google, took you a while though
@eudesgrey
@eudesgrey Жыл бұрын
I don't understand why if I follow this tutorial minutiously, I always get ERROR messages that takes me hours of research for no help at all, just confusion and frustration. Then when i finally give up, I just download the code of the lesson, open on vscode and give a npm install and ng serve, then Voilà, the project comes back showing on browser without errors anymore. Seriously, WTF? Angular can be very tiresome, mostly when following Bad tutorials like this. Does anybody know of a Good tutorial beginner friendly we could be following?
@flamousz
@flamousz Жыл бұрын
tips from me just relax and take a breath, keep your mind calm and finally see a bit minute of step then write that lecturer code to yours code. inshaallah it works
@ohmegatech666
@ohmegatech666 3 ай бұрын
Make sure to use the same versions of everything as in the tutorials, like Angular, Node, TypeScript etc.
@CaptainDouchie
@CaptainDouchie Жыл бұрын
pretty bad tutorial for beginners
@Angular
@Angular Жыл бұрын
which part makes it bad for beginners? What's missing?
@Vthoen
@Vthoen 6 ай бұрын
@@Angular After adding all the css the tutorial becomes very confusing, because you added the detail component in a different order than in the writen/text tutorial on the angular website..
@kacperkepinski4990
@kacperkepinski4990 8 ай бұрын
mess
@donmarkham9811
@donmarkham9811 6 ай бұрын
definitely not good, as why use unix commands, lol
@teemusekki1743
@teemusekki1743 8 ай бұрын
What I'm missing here after this change Learn more link doesn't work any more. "details" work but not this.
@teemusekki1743
@teemusekki1743 8 ай бұрын
Aa sorry I was too hurry
@rosendotorres3306
@rosendotorres3306 Жыл бұрын
main.ts? Where did that come from?
@mhytos42
@mhytos42 Жыл бұрын
main.ts is a file that should automatically be generated when setting up a new angular project. If its not there (in the "./src" dir) then you can just create a new, empty main.ts file and use this
Services in Angular - Learning Angular (Part 6)
14:05
Angular
Рет қаралды 57 М.
Routing and Navigation in Angular | Mosh
24:32
Programming with Mosh
Рет қаралды 285 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Angular Router - The Basics and Beyond
11:47
Fireship
Рет қаралды 131 М.
What’s new in Angular v18
20:08
Angular
Рет қаралды 136 М.
React vs Angular In 2025
8:23
Impekable
Рет қаралды 5 М.
Customizing components and directives (Part 4)
12:18
Angular
Рет қаралды 68 М.
ngTemplateOutlet is WAY more useful than I realised
16:36
Joshua Morony
Рет қаралды 77 М.
Forms in Angular - Learning Angular (Part 7)
9:43
Angular
Рет қаралды 54 М.
Angular Crash Course | Learn modern Angular in 90 minutes
1:29:09
Code with Ahsan
Рет қаралды 46 М.
Angular Components Beginner's Guide
13:52
Fireship
Рет қаралды 194 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН