All language subtitles for 6. Routes part 2

af Afrikaans
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English Download
eo Esperanto
et Estonian
tl Filipino
fi Finnish
fr French
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,390 --> 00:00:05,710 All right welcome back my students so now that you know how to use route's a little bit right. 2 00:00:06,000 --> 00:00:08,690 It's super easy just to go and create another row right. 3 00:00:08,690 --> 00:00:11,300 Let's just create one here. 4 00:00:11,880 --> 00:00:12,800 All right. 5 00:00:12,870 --> 00:00:15,240 Let's create a couple. 6 00:00:15,240 --> 00:00:15,600 All right. 7 00:00:15,600 --> 00:00:23,130 So let's say for example when you go to the contact page let's just do about unless she's returned some 8 00:00:23,130 --> 00:00:23,550 tests. 9 00:00:23,550 --> 00:00:26,880 Of course you're not going to be returning to it you're going to be returning views later. 10 00:00:26,970 --> 00:00:33,570 But you know high about Ph. 11 00:00:34,680 --> 00:00:35,210 Right. 12 00:00:35,310 --> 00:00:37,470 And then they'd say something for contact 13 00:00:40,100 --> 00:00:46,370 or something like that. 14 00:00:46,450 --> 00:00:48,760 Right. 15 00:00:49,750 --> 00:00:53,280 I am contact or whatever. 16 00:00:53,280 --> 00:01:01,980 It doesn't really matter and let's just go and visit those pages and see how we can do something they're 17 00:01:01,980 --> 00:01:03,600 about to see that. 18 00:01:03,600 --> 00:01:06,590 So we know this already. 19 00:01:06,600 --> 00:01:06,960 All right. 20 00:01:06,960 --> 00:01:14,390 I'm going to show you how to pass parameters through view two views and two whatever you want inside 21 00:01:14,390 --> 00:01:16,650 a closure function right here. 22 00:01:16,650 --> 00:01:17,260 All right. 23 00:01:17,310 --> 00:01:18,010 All right. 24 00:01:18,240 --> 00:01:23,340 So let's say for example you create and create another one real quick. 25 00:01:23,340 --> 00:01:24,150 Copy this. 26 00:01:24,180 --> 00:01:30,260 So let's just write it down because I want you to get used to writing so the route then they get mad 27 00:01:30,350 --> 00:01:31,560 it like this. 28 00:01:31,620 --> 00:01:37,950 And then the first parameter would a single call for Slash to indicate that we want to go from route 29 00:01:37,950 --> 00:01:38,040 . 30 00:01:38,040 --> 00:01:40,210 So whatever we put after this. 31 00:01:40,230 --> 00:01:48,110 So let's say for example we have a post but let's say it is puls number one and we want to see it. 32 00:01:48,420 --> 00:01:55,230 So we're going to put a forward slash and Dand the curly brackets and we can write whatever we want 33 00:01:55,230 --> 00:01:55,320 . 34 00:01:55,320 --> 00:01:58,230 I just want this to be named ID. 35 00:01:58,370 --> 00:01:59,130 All right. 36 00:01:59,130 --> 00:02:03,380 So that's going to be the name of our variable that's going to be a variable. 37 00:02:03,480 --> 00:02:05,130 Right now is not a variable. 38 00:02:05,160 --> 00:02:10,370 This is the way is it tested in this function or this method. 39 00:02:10,380 --> 00:02:13,150 All right and then later on it will convert it to a variable. 40 00:02:13,170 --> 00:02:15,490 I'll show you right now how he does this. 41 00:02:15,510 --> 00:02:21,890 Well now he does this but where it is function then the curly brackets. 42 00:02:21,900 --> 00:02:27,330 And then I mean the parentheses and then the curly brackets and then bring it down. 43 00:02:27,390 --> 00:02:30,990 Here is what you catch a variable right here. 44 00:02:30,990 --> 00:02:33,080 All right. 45 00:02:33,570 --> 00:02:38,350 Now I can return it right here if I want to. 46 00:02:38,940 --> 00:02:43,050 So returned this is 47 00:02:47,040 --> 00:02:51,240 this is PPOs number whatever. 48 00:02:51,270 --> 00:02:54,680 I'm just going to concatenate the ID right there at the end. 49 00:02:55,200 --> 00:02:56,130 All right. 50 00:02:56,130 --> 00:02:58,440 So let's see how we can do this. 51 00:02:58,550 --> 00:02:59,570 We see this in the browser. 52 00:02:59,580 --> 00:03:01,000 So let's go. 53 00:03:01,920 --> 00:03:09,350 So we go to post the forward slash and then whatever number we want to. 54 00:03:09,660 --> 00:03:16,520 As you can see says polls number two polls number one thousand if I want to. 55 00:03:16,560 --> 00:03:21,990 So you can see how he passes that variable to this closure function right there. 56 00:03:21,990 --> 00:03:23,340 All right. 57 00:03:23,340 --> 00:03:30,770 So not only that but you can pass multiple variations of multiple parameters if I want to. 58 00:03:30,930 --> 00:03:38,820 So if I could if I put another parameter here let's say this is going to be the name. 59 00:03:39,480 --> 00:03:49,140 All I have to do is on the closure function put a coma here and put the name here and concatenated here 60 00:03:49,140 --> 00:03:54,740 maybe with space or something and then put a variable there. 61 00:03:54,780 --> 00:03:56,160 All right. 62 00:03:56,160 --> 00:04:02,530 So I can go back to that put a force last year and put whatever name I want that one. 63 00:04:02,570 --> 00:04:03,930 That we go. 64 00:04:03,930 --> 00:04:06,240 So you can see you can pass multiple parameters 65 00:04:09,030 --> 00:04:09,670 to that. 66 00:04:09,810 --> 00:04:14,200 And now later on what we're going to be doing is we're going to pass this parameter to views and any 67 00:04:14,280 --> 00:04:16,990 other views we're going to be using them. 68 00:04:17,010 --> 00:04:17,910 All right. 69 00:04:17,910 --> 00:04:19,760 Very simple to do these guys. 70 00:04:19,770 --> 00:04:23,640 I mean it's not rocket science it's super easy. 71 00:04:23,640 --> 00:04:24,160 All right. 72 00:04:24,300 --> 00:04:27,040 So I want you to digest this information. 73 00:04:27,390 --> 00:04:27,850 All right. 74 00:04:27,900 --> 00:04:32,580 And that we're going to be exploring some more about routes and how we can use them with other things 75 00:04:32,610 --> 00:04:34,080 in our application. 76 00:04:34,080 --> 00:04:35,200 Thank you so much for watching. 77 00:04:35,250 --> 00:04:36,320 I'll see you in the next lecture 6633

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