All language subtitles for 1. Reusable modal

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
fr French Download
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
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,420 --> 00:00:05,500 Hi there, welcome back here in the previous lecture, we have this played the rest of the exchange 2 00:00:05,500 --> 00:00:10,020 of data they have displayed, they use their username and also avatar. 3 00:00:10,730 --> 00:00:15,300 Let's continue this lecture and let's take a look at the opportunity future. 4 00:00:16,410 --> 00:00:22,290 OK, so let's start here in our exchange detail page, and what we want to implement is benefit of click 5 00:00:22,290 --> 00:00:23,490 here, make a deal. 6 00:00:23,910 --> 00:00:30,150 This will open the model window, which you'll be able to present as good a deal for the user so we 7 00:00:30,150 --> 00:00:37,530 can adjust the price and also some information so we can send the opportunity to the to the creator 8 00:00:37,530 --> 00:00:41,220 of this exchange before we get into that. 9 00:00:41,700 --> 00:00:43,410 I will give you more explanations of this. 10 00:00:43,410 --> 00:00:47,310 I would like to create a reusable model functionality because they will have multiple models in their 11 00:00:47,310 --> 00:00:48,000 applications. 12 00:00:48,000 --> 00:00:53,640 They already have a profile model and also these make a deal that will be a model component. 13 00:00:54,240 --> 00:00:56,700 So got a profile of the model. 14 00:00:56,700 --> 00:01:00,750 And first, let's try to rework these models so we can make it reusable. 15 00:01:01,260 --> 00:01:02,790 OK, I'll show you what I mean by that. 16 00:01:04,090 --> 00:01:06,990 Go to your code or go to your profile model components. 17 00:01:07,000 --> 00:01:08,310 Let's find her components. 18 00:01:09,430 --> 00:01:15,970 And the profile model of our profile model here, you can see that the model we are controlling from 19 00:01:15,970 --> 00:01:20,700 within of the profile model component, so we are controlling the model is open, we are controlling 20 00:01:20,800 --> 00:01:22,480 Model X closed and so on. 21 00:01:23,890 --> 00:01:28,510 So now when I would like to, but I want to create a new model of the model component, I need to. 22 00:01:29,650 --> 00:01:34,510 Start from scratch and need to again create up around the model is open functionality and so on and 23 00:01:34,510 --> 00:01:34,960 so on. 24 00:01:35,170 --> 00:01:36,520 But I don't want to repeat that. 25 00:01:36,520 --> 00:01:38,140 I would like to make it reusable. 26 00:01:39,680 --> 00:01:44,450 So what they'll do, they'll go to other components, Everclear and your components, so let's create 27 00:01:44,570 --> 00:01:50,490 a new file, let's call it simply model view, and this will be a reasonable model. 28 00:01:50,530 --> 00:01:51,410 Will do it like this? 29 00:01:52,230 --> 00:01:53,570 First, let's create a template. 30 00:01:55,170 --> 00:02:00,960 And we'll enter into the template, the copy paste of parts from the profile model of be considered 31 00:02:00,960 --> 00:02:01,820 as very usable. 32 00:02:03,060 --> 00:02:06,690 Go to your profile model and actually copy the interactive here from here. 33 00:02:06,720 --> 00:02:12,150 OK, so go from down here to the app and copy the interactive. 34 00:02:13,520 --> 00:02:18,170 Got their motherlode view, and let's paste everything here and make sure everything is indented correctly. 35 00:02:19,470 --> 00:02:20,880 Now from a model, the view. 36 00:02:21,980 --> 00:02:25,280 Let's repeal the parts of which we consider to be not reusable. 37 00:02:26,060 --> 00:02:30,150 So, for example, here in this section, it very have a forum. 38 00:02:30,170 --> 00:02:34,850 This forum is only related to the profile functional activity, which will because they are updating 39 00:02:34,850 --> 00:02:38,780 here the profile, but that's the only part of it, don't really need to form in the model. 40 00:02:39,050 --> 00:02:41,230 We will get it here dynamically. 41 00:02:41,240 --> 00:02:45,980 You will see how so you can you can target the entire forum instead of the model. 42 00:02:45,980 --> 00:02:49,910 You can just simply remove it and leave it empty. 43 00:02:50,210 --> 00:02:51,950 And here is a whole other. 44 00:02:51,950 --> 00:02:51,950 Their. 45 00:02:53,540 --> 00:02:55,730 Here is a model with our body. 46 00:02:56,920 --> 00:03:02,460 A year in a bartender is also just profile model related functionality to update profiles, so for now, 47 00:03:02,460 --> 00:03:04,530 I'll just simply keep it empty. 48 00:03:05,690 --> 00:03:09,500 And here is a profile that's not really is our profile here. 49 00:03:09,920 --> 00:03:15,560 Next up, because that's what a lot of viewers thought is will be should be reusable for every, every 50 00:03:15,560 --> 00:03:16,100 component. 51 00:03:16,100 --> 00:03:17,810 So let's fly here for now. 52 00:03:18,170 --> 00:03:24,370 Update today to our update the day data update or just update, our update adds up to your update for 53 00:03:24,370 --> 00:03:24,500 them. 54 00:03:24,950 --> 00:03:26,390 Whatever you want to have there. 55 00:03:28,040 --> 00:03:31,490 OK, so have the idea for the data, OK, we can still improve it. 56 00:03:31,950 --> 00:03:33,440 We'll decide later. 57 00:03:33,770 --> 00:03:36,890 So that's after this will be a reusable model that you will be using. 58 00:03:36,890 --> 00:03:40,640 Also in other components, as you can see, how we are using here is open. 59 00:03:40,640 --> 00:03:41,360 So please. 60 00:03:41,630 --> 00:03:47,650 But I just scraped a radio script and let's define this data because otherwise it will not work so that 61 00:03:47,690 --> 00:03:48,440 we can remove. 62 00:03:49,610 --> 00:03:49,960 OK. 63 00:03:50,400 --> 00:03:51,120 Default. 64 00:03:51,230 --> 00:03:54,080 Just to export default. 65 00:03:56,250 --> 00:04:03,780 OK, and let me find here data and a data legislator in the is open and market to the falls just for 66 00:04:03,780 --> 00:04:05,580 now, so we will see that it works. 67 00:04:06,540 --> 00:04:08,430 So that's a sizable part of the model. 68 00:04:09,030 --> 00:04:12,810 And I will show you how we can connect this with your profile model. 69 00:04:13,800 --> 00:04:15,090 Go to your profile model. 70 00:04:15,930 --> 00:04:19,530 And as you can see here, from here, we can go the other way around. 71 00:04:19,530 --> 00:04:25,170 We can just leave here a forum that can just completely remove the model so we can get rid of this section 72 00:04:25,170 --> 00:04:26,190 here, Steve. 73 00:04:27,000 --> 00:04:27,590 All right. 74 00:04:27,600 --> 00:04:29,040 Just leave here and just leave here. 75 00:04:29,040 --> 00:04:30,180 Form nothing more. 76 00:04:32,000 --> 00:04:32,630 All right. 77 00:04:32,660 --> 00:04:39,590 So just remove all of this, as you can see, I will only only grow not only form nothing else here. 78 00:04:41,200 --> 00:04:41,800 OK. 79 00:04:42,690 --> 00:04:43,380 Just like this. 80 00:04:45,310 --> 00:04:48,800 Of course, this will introduce a couple of issues that he will say we'd like these and evil to go to 81 00:04:48,800 --> 00:04:52,720 your brain, but I was able to see the form is displayed and it's not inside of the models, so. 82 00:04:53,710 --> 00:04:55,060 That's not great, so what, Bill do? 83 00:04:56,600 --> 00:04:58,430 We will drop our model component. 84 00:04:59,570 --> 00:05:01,820 Well, they have created around out of form here. 85 00:05:02,810 --> 00:05:05,750 First down here in port model. 86 00:05:07,850 --> 00:05:16,010 Import model from from the components model and then divide it into the components so they can use it 87 00:05:16,010 --> 00:05:17,660 in our template model. 88 00:05:18,110 --> 00:05:25,400 And actually, that's quite a model, but let's call it exchange model or up model like this. 89 00:05:25,880 --> 00:05:28,700 OK, so actually are calling that component exchange. 90 00:05:28,700 --> 00:05:36,890 So that's the exchange model, OK, exchange model and now will go up here to your template. 91 00:05:36,890 --> 00:05:38,930 And what value exchange model? 92 00:05:40,550 --> 00:05:47,570 Like this and wrap it inside your forearm instead of the exchange model, OK, so now don't buy the 93 00:05:47,630 --> 00:05:53,870 closing bracket yet, but go under the forum and close it here and like this. 94 00:05:56,450 --> 00:05:59,690 OK, so now your exchange model is wrapping around the forum. 95 00:06:00,170 --> 00:06:01,460 OK, so let's save it. 96 00:06:02,810 --> 00:06:03,200 Go back. 97 00:06:03,200 --> 00:06:05,360 You can see now your model is displayed. 98 00:06:06,750 --> 00:06:12,240 The when we opened up the data, we are opening the model, you can see that model is getting open, 99 00:06:12,930 --> 00:06:14,820 but there is no forum. 100 00:06:16,310 --> 00:06:22,390 OK, because of course, when you click on the update info now, update info will open this this model 101 00:06:22,410 --> 00:06:26,510 here and you can see this model is completely empty. 102 00:06:27,170 --> 00:06:27,520 OK. 103 00:06:27,560 --> 00:06:28,850 That's what you see here. 104 00:06:28,880 --> 00:06:30,380 You're opening this model now. 105 00:06:30,410 --> 00:06:31,280 Updated data. 106 00:06:31,760 --> 00:06:32,780 Is this model here? 107 00:06:34,280 --> 00:06:35,740 What do you want to display here? 108 00:06:35,740 --> 00:06:42,430 Instead, they'll be the model body, which will be dynamic depending on the content which will the 109 00:06:42,430 --> 00:06:43,810 model will receive. 110 00:06:45,080 --> 00:06:50,840 OK, so to think you about us start CPR or they want to do OK, I'll show you. 111 00:06:51,970 --> 00:06:54,730 Is that they have a now currently two components, right, they have a model. 112 00:06:56,660 --> 00:07:02,960 Model and model is wrapping are a profile model actually profile model like this profile model? 113 00:07:05,370 --> 00:07:09,750 Profile model has a model inside of its templates, a profile model is the. 114 00:07:10,650 --> 00:07:12,870 He's basically the brother around the model. 115 00:07:14,340 --> 00:07:19,140 So the to the profile model they can provide are form templates, so they can provide a form template 116 00:07:19,980 --> 00:07:24,540 and the model will be responsible or responsible to render this form template. 117 00:07:25,200 --> 00:07:25,560 OK. 118 00:07:26,650 --> 00:07:31,510 So we could use props, though, actually not in this case, but what they can do here are we can evaluate 119 00:07:31,510 --> 00:07:38,140 something called slot like this to the value slot, and this is very interesting because now it will 120 00:07:38,140 --> 00:07:38,410 work. 121 00:07:38,410 --> 00:07:43,870 You will see if any of you will produce slot, you'll save it will go back to here, you will refresh. 122 00:07:43,870 --> 00:07:45,330 Or actually you could see the already. 123 00:07:45,900 --> 00:07:48,850 You will have their quick update in for your your model. 124 00:07:49,540 --> 00:07:51,870 So what basically happened in your profile model? 125 00:07:52,960 --> 00:08:00,130 Here you are passing your forum inside of the extension model and whatever is passed through the brackets 126 00:08:00,130 --> 00:08:06,310 here to the opening and closing bracket of the extension model is replace is placed into the slot. 127 00:08:06,760 --> 00:08:10,150 So this slot is replaced basically if you imagine it by the entry form. 128 00:08:10,680 --> 00:08:12,310 OK, you are passing it to exchange models. 129 00:08:12,310 --> 00:08:15,820 So this entry form is getting into the slot, so that's why you can display it now. 130 00:08:17,260 --> 00:08:18,250 Of course, a couple of things. 131 00:08:18,250 --> 00:08:22,470 A lot work still because save changes button we haven't didn't hook up with the new model, so and I 132 00:08:22,480 --> 00:08:23,710 will update the data. 133 00:08:23,710 --> 00:08:24,680 This will not work yet. 134 00:08:24,700 --> 00:08:28,510 No big deal because these will be fixing in in the next lecture. 135 00:08:29,290 --> 00:08:32,020 So guys, I hope everything is clear at this point. 136 00:08:32,020 --> 00:08:37,810 If something, as always, you can just divide me in the Q&A section, we will end up the lecture here 137 00:08:37,810 --> 00:08:39,880 and will continue in the next one two years. 12926

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