All language subtitles for 4. The RouterOutlet Element

af Afrikaans
sq Albanian
am Amharic
ar Arabic Download
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
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,700 --> 00:00:04,750 At the end of the last video I mentioned that we were about to start working on some different components 2 00:00:05,050 --> 00:00:09,760 but before we do I just want to have one last quick discussion about some basic navigation and routing 3 00:00:09,760 --> 00:00:11,610 stuff inside our application. 4 00:00:11,740 --> 00:00:14,690 But here's a diagram of what is now going on inside of our app. 5 00:00:14,890 --> 00:00:19,510 At the very top we've got our app module and down at the bottom we've got the elements module and the 6 00:00:19,510 --> 00:00:23,930 collections module in each of those are creating one single component. 7 00:00:24,040 --> 00:00:30,280 At present neither of those modules are exporting their components collections module and elements module 8 00:00:30,550 --> 00:00:32,680 no exports whatsoever. 9 00:00:32,720 --> 00:00:34,650 We are only showing these different components. 10 00:00:34,660 --> 00:00:39,820 Whenever a user goes to a very specific route we would refer to the elements module and the collections 11 00:00:39,820 --> 00:00:47,090 module as examples of a rounded module in order to decide when to show those components. 12 00:00:47,170 --> 00:00:52,990 We have our elements routing module and the collections routing module VARs you had guests. 13 00:00:52,990 --> 00:00:58,390 Those are both examples of routing modules a defined some rules on Windows so each of those different 14 00:00:58,390 --> 00:01:01,830 components go inside the elements routing module. 15 00:01:01,840 --> 00:01:07,150 We said whenever a user goes to elements or the route elements inside the URL you show the elements 16 00:01:07,150 --> 00:01:10,370 on component and likewise for collections. 17 00:01:10,390 --> 00:01:15,340 One thing that is really interesting about all this routing stuff is that we never added any explicit 18 00:01:15,400 --> 00:01:19,950 configuration to the app module whatsoever beyond saying Oh yeah. 19 00:01:19,960 --> 00:01:24,220 Just go ahead and import the elements module and the collections module. 20 00:01:24,220 --> 00:01:30,370 The second we add in those imports the app module is going to automatically see the two routing modules 21 00:01:30,550 --> 00:01:37,290 and all the routing configuration that we placed inside of both them though we can really consider this 22 00:01:37,290 --> 00:01:40,370 collections module thing like all this stuff right here. 23 00:01:40,380 --> 00:01:45,660 It completely encapsulates the entire collections feature right now everything about the collections 24 00:01:45,660 --> 00:01:53,700 Page I mean everything on it from the components that are going to be displayed on here to the URL everything 25 00:01:53,760 --> 00:01:58,440 about this page right here is wrapped up inside of that collections module. 26 00:01:58,440 --> 00:02:00,200 Same thing for elements as well. 27 00:02:01,210 --> 00:02:05,850 The last thing want to mention really quickly is where these components are actually being created. 28 00:02:05,930 --> 00:02:09,160 In other words how do they actually end up on the screen. 29 00:02:09,170 --> 00:02:14,420 Well let's go back to our app component template file and I want to point out one very interesting element 30 00:02:14,450 --> 00:02:15,710 that we left inside there. 31 00:02:16,520 --> 00:02:19,090 The back inside of my app component template file. 32 00:02:19,260 --> 00:02:22,170 Remember there's the router outlet right here. 33 00:02:22,390 --> 00:02:28,020 Whenever angular takes a look at that you are L though the actual You are all that the user types inside 34 00:02:28,020 --> 00:02:29,720 the address bar. 35 00:02:29,720 --> 00:02:35,300 It's going to take a look at that you l and try to find some component that matches the current url. 36 00:02:35,370 --> 00:02:41,190 So in my case right now I'm at slash elements so it seems that whenever a user is at elements it should 37 00:02:41,190 --> 00:02:47,700 show the elements home component angular is then going to create an instance of that component and automatically 38 00:02:47,700 --> 00:02:54,240 display it inside of this router outlet thing right here or wherever we place our router outlet is where 39 00:02:54,240 --> 00:02:56,150 our component is going to be created. 40 00:02:56,340 --> 00:03:01,260 We can actually test that very easily if we just add in some markup on either side of it. 41 00:03:01,440 --> 00:03:10,510 I can add a div right above and say something like about components will be created low and I could 42 00:03:10,510 --> 00:03:17,490 do something very similar right after and I can say component will be created above if I then save that 43 00:03:17,910 --> 00:03:23,730 and then go back over to my browser I'll see commands can be created below there's the above and between 44 00:03:23,850 --> 00:03:26,410 is the elements home component. 45 00:03:26,620 --> 00:03:31,770 Again angular is going to find whatever component matches the current root it's going to take that component 46 00:03:31,920 --> 00:03:39,410 and display it in place of this router outlet thing right here now that we understand the purpose of 47 00:03:39,410 --> 00:03:40,810 this router outlet. 48 00:03:40,940 --> 00:03:45,650 We can also start to understand how we can display some navigation elements inside of our application 49 00:03:46,190 --> 00:03:52,300 such as this navigation bar at the very top let's take a quick pause right here. 50 00:03:52,350 --> 00:03:55,380 We're gonna start working on this little navigation bar up here. 51 00:03:55,380 --> 00:03:59,880 We're going to make sure that we eventually show whatever current component is active right underneath 52 00:03:59,880 --> 00:04:00,630 it. 53 00:04:00,720 --> 00:04:02,550 Quick pause and I'll see you in just a moment. 6098

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