Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,960 --> 00:00:05,820
Now that my project is all generated I'm going to change into that heights project directory and then
2
00:00:05,820 --> 00:00:09,950
start up my development server inside their between the last video and this one.
3
00:00:09,950 --> 00:00:12,570
I also already started up my code editor.
4
00:00:12,740 --> 00:00:14,480
So here it is right here.
5
00:00:14,480 --> 00:00:16,880
Let's get start working on this project right away.
6
00:00:16,910 --> 00:00:20,480
We already know that there is definitely a couple of different things we're going to have to do if we
7
00:00:20,480 --> 00:00:21,950
want to show a form like this.
8
00:00:21,950 --> 00:00:27,110
Well we're definitely gonna have to probably add in a lot of additional H to email because we're really
9
00:00:27,110 --> 00:00:31,340
just trying to work with some pipes here and we're not really concerned with learning about anything
10
00:00:31,340 --> 00:00:32,370
else around angular.
11
00:00:32,360 --> 00:00:36,330
We're just gonna write out all the HD channel for this directly inside of our app component.
12
00:00:36,350 --> 00:00:40,520
Let's open up our app component and we're going to immediately start to put together some elements to
13
00:00:40,520 --> 00:00:46,010
display this receive her name input right here and then eventually print that information out on the
14
00:00:46,010 --> 00:00:53,070
side then said my editor I'll find my SRT directory inside there is the app folder and inside there
15
00:00:53,100 --> 00:00:59,490
I'll find my component template and the component template is all that place holder starter content
16
00:00:59,770 --> 00:01:04,140
I'm going to select everything inside there and delete it then I'll replace it.
17
00:01:04,970 --> 00:01:14,930
With a div that contains a label I'll give it some text like a e name.
18
00:01:15,020 --> 00:01:18,790
Then after that I'll place an input as usual.
19
00:01:18,820 --> 00:01:23,320
We're gonna set up some event handler on this input element and detect any time that the user types
20
00:01:23,320 --> 00:01:29,160
inside their as we've seen many times we can use that event binding syntax we can write inside their
21
00:01:29,160 --> 00:01:34,340
input because that's the name of the event we want to watch for and whenever that event occurs I'm going
22
00:01:34,340 --> 00:01:38,360
to try to call a method on my app component that we're gonna add in very shortly.
23
00:01:38,370 --> 00:01:39,380
Hold on.
24
00:01:39,440 --> 00:01:48,150
Name change and I'll take the event object and just pass in the target date value property.
25
00:01:48,260 --> 00:01:52,340
Go on name change is gonna be called with some string and that is going to be the name that we want
26
00:01:52,340 --> 00:01:54,560
to pay some money to.
27
00:01:54,590 --> 00:01:58,990
Let's now save this and then go back over to our app component and make sure we define this method.
28
00:02:00,850 --> 00:02:02,550
Inside of my app component.
29
00:02:02,590 --> 00:02:08,670
Yes file I'm going to remove that stand and property right here of title that just gets added in automatically
30
00:02:08,670 --> 00:02:15,740
any time we generate new projects and I'll replace it with a new name property and I'm going to imitate
31
00:02:15,740 --> 00:02:25,950
its type as being a string I'll then define the method on name change Go on name change.
32
00:02:25,970 --> 00:02:31,070
This is gonna taken some value that is a string and I'll use that to update the Name property right
33
00:02:31,070 --> 00:02:31,820
there.
34
00:02:31,970 --> 00:02:40,220
Let's say this dot name is value now that we've got this property of name on our class component of
35
00:02:40,220 --> 00:02:40,760
app.
36
00:02:40,820 --> 00:02:45,190
Let's go back over to our template and we're going to reference that property inside that template and
37
00:02:45,190 --> 00:02:46,830
print it up on the screen.
38
00:02:46,870 --> 00:02:53,450
All right after that div I'm going to place some double curly braces mental printouts that name property
39
00:02:53,510 --> 00:02:55,970
like so.
40
00:02:56,060 --> 00:02:56,320
All right.
41
00:02:56,390 --> 00:02:58,900
So this is one little form feature put together.
42
00:02:58,910 --> 00:03:03,690
So let's save this then flip back over to our application in the browser.
43
00:03:03,690 --> 00:03:10,400
So good to it look close to 40 to 100 now I should be able to type inside of here and see some text
44
00:03:10,400 --> 00:03:12,840
appear on the screen.
45
00:03:13,240 --> 00:03:18,190
Now if I enter in some person's name like let's say my cat's name of Scarlet greater because for some
46
00:03:18,190 --> 00:03:24,880
reason I'm going to pay Scarlett twenty dollars I'll see that the text that comes out is all lowercase
47
00:03:24,880 --> 00:03:29,860
formatted as you can imagine it'd be a lot nicer whenever we start talking about some really official
48
00:03:29,860 --> 00:03:34,680
thing like handling money or payment we printed out this name with some better formatting.
49
00:03:34,840 --> 00:03:37,040
This is where pipes are going to come into play.
50
00:03:37,090 --> 00:03:38,280
Let's take a quick pause right here.
51
00:03:38,290 --> 00:03:41,350
When we come back the next video we'll take a look at our first pipe.
5591
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.