Angular 6 Basics 15 - Passing member variables to components

preview_player
Показать описание

We'll continue exploring parameter passing to components - this time as an object instance. Learn the difference between passing a literal value and passing a member variable of the component using the `[]` to force value resolution.

Angular 6 Basics - Learn how to create Angular applications from scratch. Understand the Angular framework and learn how to use the features of the framework to create components and services. Use modules to organize your code. Build applications that call REST APIs and fetch data from a server. Implement routing to show multiple views with multiple URLs.

This course requires no previous knowledge of Angular or AngularJS.
Рекомендации по теме
Комментарии
Автор

U made it easy bro. U r amazing. Best angular teacher u r on entire youtube.

farhanrao
Автор

I never found a tutorial that explains this so well. This is great.

asmrtist
Автор

This was a tough concept to understand :)

kinjalthehero
Автор

Error: 'Property 'user' has no initializer and is not definitely assigned in the constructor.'
set : false
in "angularCompilerOptions": of tsconfig.json file inside your project folder.

Additionally, set: "noImplicitReturns" to false.

niharikapatnaik
Автор

Great video again. One suggestion, I got really confused because of the same variable name 'user' used twice. Things could be very clear if you can use different variable names.

kinjalmistry
Автор

I did not know this was possible in Angular. Thanks!

jesusguerra
Автор

Very good explained, i did need to know how to create child components for example EChart Subpage component

satish
Автор

object possibly undefined - fix: this.user = {
name: this.userObj!.name,
title: this.userObj!.designation,
address: this.userObj!.address,
phone: this.userObj!.phone
};
the ! operator solves the problem (or at least suppresses the error). Hopefully someone can explain this completely?

marcholman
Автор

@JavaBrains
Why did we not use @Input to pass the user object into the component

DILEEPKUMAR-ldbu
Автор

Great, thanks so much. it's very useful <3

tayfoooooor
Автор

Good explanation but, in this topic "user" repeats so many times it confuses a lot so please use different variables names for differentiation from one another

prashantsakre
Автор

Okay so the user : any is now initialized by the fields of the injected object userObj : User.

JamesJt
Автор

Why I have done this without the model? Do I really need it?

YinYang
Автор

But when you remove the code from ngOnInit() in address-card.component.ts somehow the title is not getting populated on the localhost page or it is getting removed for some reason. Can some one explain?? Thanks

ramkumarkirubanandam
Автор

Can someone post the code or github link for the above code as I am not getting the output shown - I am quite sure I have done some minor error and I am not able to find it.


Nothing can be better if Javabrains can share github link. Great video

mjthemj
Автор

So much of user User word..should take different variable names at some places to make it more understable..

ashvini
Автор

Hi
Can anyone please explain briefly where is this concept used ?
Thanks

MrRicharddaniel
Автор

I get the error TypeError : Csnnot set peroperty 'name' of undefined in app.componenet.ts can somebody help me?

pg
Автор

Iam confused with this concept, what's going on?

blunderfoxbeta
Автор

4:03 I'm sure this is not even fast forwarding. That's just the regular speed that Koushik works at when he doesn't have to explain anything to the peasants.

asmrtist