Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,470 --> 00:00:01,770
OK.
2
00:00:01,820 --> 00:00:04,210
So there's definitely two outstanding things we have to do.
3
00:00:04,220 --> 00:00:07,910
Like I mentioned we have to make sure we reference an actual image inside of our image tag.
4
00:00:07,910 --> 00:00:12,320
We also have to add in some custom CSX to limit the width of this big old cart.
5
00:00:12,320 --> 00:00:15,540
Let's first take care of adding in some images to our project.
6
00:00:15,680 --> 00:00:20,010
Now in general in an angular project there are two different ways we can make use of images.
7
00:00:20,090 --> 00:00:25,940
We can either refer to images that are hosted out on some remote server online or we can include some
8
00:00:26,030 --> 00:00:28,860
static image files inside of our project.
9
00:00:29,210 --> 00:00:34,130
But this application we're going to make use of some static image files so that you understand how to
10
00:00:34,130 --> 00:00:40,940
include static resources like say images or sounds inside of an angular project though attached to this
11
00:00:40,940 --> 00:00:42,540
lecture as a resource.
12
00:00:42,540 --> 00:00:49,140
You're going to find a little zip file called something like cards 0 0 4 images dot zip to make sure
13
00:00:49,140 --> 00:00:55,050
you pause this video right now go to the resources attached to this video and find this little zip file
14
00:00:55,080 --> 00:00:56,640
and download it.
15
00:00:56,640 --> 00:01:02,340
Once you download this file go ahead and unzip it and then inside there you're going to find three different
16
00:01:02,370 --> 00:01:03,720
images.
17
00:01:03,840 --> 00:01:04,800
One is of a tree.
18
00:01:04,800 --> 00:01:07,440
One is of mountains and one is of biking.
19
00:01:07,490 --> 00:01:12,270
These are the three static images that we want to use for our application for each of these different
20
00:01:12,270 --> 00:01:13,280
cards.
21
00:01:13,500 --> 00:01:18,810
We need to figure out how to add those images into our project so we can refer to them inside of our
22
00:01:18,810 --> 00:01:21,530
HMO files okay.
23
00:01:21,580 --> 00:01:22,630
I'm gonna flip over to my code.
24
00:01:22,640 --> 00:01:29,810
Ed inside of my SRT directory we'll find a folder inside of here called assets.
25
00:01:29,970 --> 00:01:34,620
Any file that you put inside this assets directory is going to be made available to the rest of your
26
00:01:34,620 --> 00:01:36,230
angular application.
27
00:01:36,340 --> 00:01:43,480
We can put inside this assets directory things like raw JavaScript files or images or audio or Ross
28
00:01:43,480 --> 00:01:49,620
the SS files just about anything that you want to make directly available to your application.
29
00:01:49,650 --> 00:01:54,930
We're going to take our three images and put them into that directory that will then allow us to directly
30
00:01:54,930 --> 00:02:01,470
reference them from the different image tags we put into our application though to open up that directory.
31
00:02:01,530 --> 00:02:06,630
If you're using Visual Studio code you can right click on assets and then you'll see something like
32
00:02:06,690 --> 00:02:09,510
reveal in finder if you're using Windows.
33
00:02:09,510 --> 00:02:14,010
I think the term might be slightly different but essentially we want to open up that assets directory
34
00:02:14,010 --> 00:02:23,650
inside of a folder explorer look here's my assets directory I'm gonna open that folder up and then go
35
00:02:23,650 --> 00:02:29,280
in to find the images that I just downloaded and I'm going to drag and drop those three images into
36
00:02:29,280 --> 00:02:30,450
the assets directory
37
00:02:33,310 --> 00:02:39,060
now that I've moved those images over I should see them inside the assets folder inside my code editor.
38
00:02:39,390 --> 00:02:45,100
So now that these files are included inside my project we can refer to them directly from Image tags
39
00:02:45,700 --> 00:02:50,830
where if we were making use of audio elements week or year audio files we can create some audio elements
40
00:02:51,100 --> 00:02:56,740
where if we had some raw javascript we can make script tags and refer to them as well but to refer to
41
00:02:56,740 --> 00:03:03,010
a file inside of our assets directory in the source property of the image right here we'll say assets.
42
00:03:03,040 --> 00:03:09,040
So that looks at the assets folder flash and then the file that we want to get the car that we're working
43
00:03:09,040 --> 00:03:13,980
on right now is trying to show the tree card we'll get our tree dot JPEG image in here.
44
00:03:14,030 --> 00:03:18,220
It's all right out inside that image source tree dot JPEG.
45
00:03:18,340 --> 00:03:21,630
Notice that it's JP e.g. not just JP.
46
00:03:21,690 --> 00:03:24,400
So make sure you get the full extension on their.
47
00:03:24,570 --> 00:03:26,040
Now we save this file.
48
00:03:26,070 --> 00:03:30,530
You can flip back over to our browser and we'll see a gigantic tree up here.
49
00:03:31,780 --> 00:03:32,400
We scroll down.
50
00:03:32,430 --> 00:03:33,940
We still see the rest of the card.
51
00:03:34,050 --> 00:03:36,440
So we've now kind of fixed up issue number one.
52
00:03:36,450 --> 00:03:39,900
You can show an actual image or a static image inside of application.
53
00:03:39,900 --> 00:03:41,330
We still have to add in some customers.
54
00:03:41,360 --> 00:03:41,840
Yes yes.
55
00:03:41,850 --> 00:03:46,540
To limit the width of this card so it doesn't show up quite so large though.
56
00:03:46,550 --> 00:03:47,610
Quick pause right here.
57
00:03:47,630 --> 00:03:50,090
We'll figure out the CSF side in just a moment.
5977
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.