All language subtitles for 5. Ref to component

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

In the last lecture, you have learned how to parse elements into your custom components.

We have done this with the template and and the slots in this lecture will continue with the model for

a one hour lecture and then I promise we'll get into the opportunity concept.

Well, I would like to show you in this one is how you can get access to your model component to your

is a billion dollar component in your profile model without passing here any callback functions and

any props.

OK, first, let's go to your model, the view, and we'll do an improvement in our model that you can

see here by clicking here or we are doing any changes with our eyes open, we are always manually getting

our variable is open and we are selling their value true or false.

Let's do it differently.

Let's get your methods, and we'll call these methods open and close.

OK, so in a methods after something models by are common, let's create a function of call open.

All right, and we'll create your function of close function, this function will be simply setting

that is open.

This is open to true in the case of open and the closed will be.

This is open.

Be false simply as that now to on SEC says we just simply need to pause.

Here are close functions that can just puzzle this close.

Some of them a lot will be submitted on the successful vehicles model.

It's much easier to read and then also in our templates, we can change it.

So here on a click is a false and it'll be close.

So just call here.

Close here is open.

Is false the same thing?

Let's call your close.

It's open, this will stay.

This click is open, it's true this will be open and here will be open through this, they'll be open

as well.

I click the button here is that instead of manually assigning the value to the variable.

OK.

Now we have these functions, we can try it out if we can still close and open a model.

We should be able to as everything as works as before we can update our data.

No big deal about closing the models after it's updated.

OK, yes.

This is this works.

And now.

I would like to show you how you can achieve this.

And your profile mother, for example, they can use it.

Harvey can call here to close model deeds, passing here any callbacks.

You can do it like it is, scroll up into the air template, there is your exchange model and it will

right on an exchange model special attribute called Ref.

OK.

Like this?

To directly specify your custom name, whatever you want to call it.

I can call it exchange model, for example.

OK.

This will be a reference to this exchange model component.

Now in our corporate properties, we don't have you here, and he looks great here while uncompleted

property actually under the data.

Properties.

You will get access to this model, bill that here we will call these companies property, let's say

just a simple model we can call it and return from this these dollars sign that arrives and the exchange

exchange model.

So these are the arrives here is available in every component.

And on this, you will have the moral component there, actually any component, if you will, define

the reference of this component in this case or not, a custom exchange component, we are creating

the reference of the Bureau think reference of the extras model.

That's how they are calling this and therefore on this their object.

They can access the exchange model.

And this gets me access to the exchange model data and the methods.

OK.

I'm calling it Modelo internally, so they compute that, so here in on sex, I'd like to pass anything

now.

Of course I still can, but I can remove this.

All right.

And on the sex is now I can call this model.

To the close.

OK.

And that's it.

I can call here simply this model close, because this model here returned to the reference is the model

here and I can access the methods of the model.

OK, I can access open a close and all of this here, so now we're able to go back to my browser, which

is very fresh in a case that everything is, it's OK clicking a custom button.

Change your name.

Save changes and you will see you're able to close this, and the model has been updated.

All right.

So custom button, I wonder I'll try one more time.

We'll see.

All right.

Their name safe changes, and now it's what, all closing immediately.

I think we are not waiting after the prophase update, and we are calling this simply to close the function

to close the five sites.

Let's take a look at this.

All right.

On a success.

We are passing the close.

Oh, OK, so we've done it the puzzle.

We beginning to pass it still, OK, but the issue will be in a profound model, I guess on a sex.

Oh yeah, here is a issue which is the only reference to the fact we should be calling it.

If you want something they can quite like, this puzzle function better will call this model close.

OK, so that's doubles their issue line here.

Does that behavior.

We have been calling it immediately and to not ban the profile has been updated, so puzzle is calling

this a proper function.

Then instead of, these will call a close.

And here the all of you, everything should be fine here.

OK, so back here now, we can just click here to change the name.

Although rates have changes and issues of work now, now it's fine.

All right, so everything is works now you can you have learned how to also get access to your components

through there a reference, and now we can fairly continue with that opportunity feature.

Finally and eventually my internet slogan not even loaded.

So let's go to the next lecture, guys.

Cheers.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.