Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,630 --> 00:00:03,040
In this video we're going to start working on our next application.
2
00:00:03,160 --> 00:00:07,150
This next out there we're going to work on is gonna be very very small in nature because really just
3
00:00:07,150 --> 00:00:10,420
going to try to play around with a feature inside of angular.
4
00:00:10,420 --> 00:00:12,740
First off let's talk about what that feature is.
5
00:00:12,900 --> 00:00:18,640
We're going to be working with pipes inside this application are really just functions that we call
6
00:00:18,670 --> 00:00:20,650
and make use of inside of templates.
7
00:00:20,650 --> 00:00:25,150
We call them in order to format some amount of information and then printed out inside of a template
8
00:00:25,730 --> 00:00:32,230
so a pipe you can really imagine really picture as just being a very plain function usually only make
9
00:00:32,230 --> 00:00:34,090
use of pipes inside of a template.
10
00:00:34,090 --> 00:00:38,680
You can't technically make use of them outside of a template but that's not ever really going to happen.
11
00:00:38,680 --> 00:00:41,320
Instead we only use them inside of a template.
12
00:00:41,570 --> 00:00:45,580
Some pipes that we're going to use are built into angular and those are some that we're going to take
13
00:00:45,580 --> 00:00:46,820
a look at directly.
14
00:00:46,990 --> 00:00:53,140
You can find a partial list of the ones that are built into angular at this address right here we can
15
00:00:53,140 --> 00:00:55,180
build our own pipes very easily.
16
00:00:55,180 --> 00:00:59,260
So essentially really just comes down to writing out a function that is going to be used to format some
17
00:00:59,260 --> 00:01:01,540
amount of data now.
18
00:01:01,590 --> 00:01:05,910
Leslie on you mentioned here is that as we take a look at pipes if they a little bit weird or strange
19
00:01:05,910 --> 00:01:10,350
or anything like that just keep in mind that you are not strictly required to use pipes and angular
20
00:01:10,620 --> 00:01:11,690
like many other features.
21
00:01:11,700 --> 00:01:15,750
They are optional but I think that once you see these pipe things you're going to say oh yeah that's
22
00:01:15,750 --> 00:01:16,360
pretty handy.
23
00:01:16,560 --> 00:01:18,000
I should probably use that pretty frequently.
24
00:01:18,810 --> 00:01:19,120
OK.
25
00:01:19,140 --> 00:01:23,100
So with all that in mind let's take a look at a quick mockup of the application we're going to build
26
00:01:23,130 --> 00:01:27,910
to play around with pipes for a little bit and then start to generate our project.
27
00:01:27,930 --> 00:01:28,190
All right.
28
00:01:28,200 --> 00:01:29,610
So here's what we're going to build.
29
00:01:29,610 --> 00:01:32,420
We're gonna make a little imaginary payment form.
30
00:01:32,550 --> 00:01:36,430
User is going to enter in some payment information here on the left hand side.
31
00:01:36,500 --> 00:01:41,580
Then as a user enters that information we're going to essentially duplicate that information over here
32
00:01:41,610 --> 00:01:42,690
on the right.
33
00:01:42,690 --> 00:01:49,070
But as we duplicate that information out we're going to format that data in a much better fashion.
34
00:01:49,080 --> 00:01:53,690
For example I might be trying to pay some money to my cat named Scarlett.
35
00:01:53,880 --> 00:01:56,520
I might enter lowercase Scarlett Greider.
36
00:01:56,690 --> 00:02:01,350
I would then take that text and print it out with leading capital letters over here on the right.
37
00:02:02,070 --> 00:02:07,200
Likewise I might might enter a payment date right here but I want to take that date and print it out
38
00:02:07,230 --> 00:02:10,360
in a long form formatted very nicely.
39
00:02:10,410 --> 00:02:15,120
Then finally I enter in some kind of payment amount I would want to take that amount and format it with
40
00:02:15,120 --> 00:02:20,750
some currency symbol and a decimal as well so in putting this little application together we're going
41
00:02:20,750 --> 00:02:23,550
to use three different pipes that are built into angular.
42
00:02:23,720 --> 00:02:27,470
After we finish up with this app we're then going to take a look at a couple of other pipes and even
43
00:02:27,470 --> 00:02:29,390
build one or two on our own.
44
00:02:29,390 --> 00:02:33,710
Not really tied to this application but maybe we're going to do it inside this app but it's not really
45
00:02:33,710 --> 00:02:37,190
going to be a part of this like payment form kind of thing OK.
46
00:02:37,230 --> 00:02:42,720
So again this whole application here very small very simple it's only going to take us a couple of minutes
47
00:02:42,720 --> 00:02:48,270
to put together really only building it just to play around with pipes for a little bit not with all
48
00:02:48,270 --> 00:02:48,870
that mind.
49
00:02:48,870 --> 00:02:54,930
Let's go back over to our terminal and get inside of a workspace directory inside of here I'm going
50
00:02:54,920 --> 00:03:03,090
to generate a new project with energy new I'm going to call this simply pipes going to use the default
51
00:03:03,090 --> 00:03:08,610
responses of no and C Ss and then as that generates I'm going to take a quick pause right here.
52
00:03:08,640 --> 00:03:12,240
We'll come back the next video startup our project and start to play around with pipes.
5642
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.