1
00:00:00,210 --> 00:00:01,110
Hello again, everyone.

2
00:00:01,140 --> 00:00:05,990
So in this lesson, we're going to talk about pipes and angular.

3
00:00:06,600 --> 00:00:07,080
All right.

4
00:00:07,830 --> 00:00:18,900
So we can define an angular pipe feature briefly and well, I'd say simply as filtering or conversion.

5
00:00:19,950 --> 00:00:24,510
So the bike process can be defined as sending a value or data.

6
00:00:25,540 --> 00:00:34,390
Into pipes, processing these values and generating a new value according to the transformations in

7
00:00:34,390 --> 00:00:34,960
itself.

8
00:00:37,130 --> 00:00:41,150
So the data we receive may not always be in the form that we want to use.

9
00:00:42,560 --> 00:00:47,240
So in cases like that, we'll need to take action on that incoming data.

10
00:00:48,600 --> 00:00:54,390
Also, apart from pipes and angular, it can be written in private pipes.

11
00:00:56,110 --> 00:01:03,580
For example, we may want all the letters of a word to be upper or lower case, well, in cases like

12
00:01:03,580 --> 00:01:05,890
that, we can get help from pipes.

13
00:01:07,220 --> 00:01:13,190
Now, to see the pipes defined and angular itself, I'll just open up the angular homepage.

14
00:01:14,220 --> 00:01:19,040
I'll open up an API list from here and write a pipe into the search bar.

15
00:01:20,620 --> 00:01:27,400
So, look, there are already existing pipes that we can use, for example, there's a tidal pipe for

16
00:01:27,640 --> 00:01:32,290
capitalization or decimal pipe for numeric data.

17
00:01:33,550 --> 00:01:36,420
So now let's examine the use of a few of these pipes are.

18
00:01:37,980 --> 00:01:41,010
So we'll define some variables in our test file.

19
00:01:49,700 --> 00:01:51,870
Now, another type is string and No.

20
00:02:01,250 --> 00:02:03,390
So I have defined our variables.

21
00:02:04,280 --> 00:02:08,480
Now let's have a look at the use of pipes and templates.

22
00:02:10,150 --> 00:02:12,490
So first of all, I want to use our strong variable.

23
00:02:13,930 --> 00:02:17,070
So I'll get the variable with the string interpolation.

24
00:02:18,100 --> 00:02:25,030
Now let's see the first writing, so I'm copying this and the initial values all lowercase.

25
00:02:26,190 --> 00:02:29,820
So I'm going to do a pipe sign for this and then I'll write lowercase.

26
00:02:30,750 --> 00:02:34,240
Then I want the initials to be capitalized.

27
00:02:34,980 --> 00:02:39,750
I'll write this sign again for this and this time I am typing title case.

28
00:02:42,730 --> 00:02:47,850
So now when we look at the changes, as you can see, there are the different formats.

29
00:02:48,880 --> 00:02:52,180
So, yeah, it really is that easy to use existing pipes.

30
00:02:54,360 --> 00:02:59,070
So let's say that we want to do some number format's.

31
00:03:00,010 --> 00:03:03,570
So we'll print this number and do it in a number format.

32
00:03:12,750 --> 00:03:15,450
We see that the number is written.

33
00:03:16,320 --> 00:03:19,200
And, well, certainly an easier way to read.

34
00:03:21,000 --> 00:03:27,900
So now I want to format a number with a decimal, so I print this number in a number format of prints

35
00:03:27,900 --> 00:03:28,680
like this.

36
00:03:30,660 --> 00:03:32,870
But I want to print it in a different format.

37
00:03:34,430 --> 00:03:41,300
So I will write the format that I want to print in single quotes, so let's say that I want this number

38
00:03:41,300 --> 00:03:43,980
to have three digits after the comma.

39
00:03:44,840 --> 00:03:45,380
So for this.

40
00:03:45,390 --> 00:03:49,100
All right, one dot three, dash three.

41
00:03:50,090 --> 00:03:56,810
And actually, here is the part that displays the minimum number of digits and the maximum number of

42
00:03:56,810 --> 00:03:58,310
digits after the comma.

43
00:03:59,470 --> 00:04:02,860
And as you can see, there are three digits after the comma.

44
00:04:03,880 --> 00:04:05,400
And if we change this to.

45
00:04:06,660 --> 00:04:09,420
It rounds the numbers and writes two digits.

46
00:04:12,350 --> 00:04:17,180
All right, so you may be thinking, but it doesn't matter because I want to show it to you anyway,

47
00:04:17,570 --> 00:04:20,450
let's say that I want to write a date format.

48
00:04:21,410 --> 00:04:27,350
So I'm writing, you know what, no, let's assign today's date to a variable.

49
00:04:28,270 --> 00:04:30,490
That's a number, so I'll print it normally.

50
00:04:32,650 --> 00:04:35,590
So I'll also print it in date format.

51
00:04:37,080 --> 00:04:41,360
Now, look, the first value is a little meaningless to us, right, wrote milliseconds.

52
00:04:42,370 --> 00:04:47,110
Well, here it wrote in this format, so, yeah, let's examine this pipe here.

53
00:04:48,830 --> 00:04:52,880
So to do this, let's review the angular homepage.

54
00:04:53,840 --> 00:04:59,990
So start examining pipes from here, and I'm looking for date format's.

55
00:05:02,610 --> 00:05:07,290
So now when we use a short date, the result will be written in this format.

56
00:05:13,230 --> 00:05:17,370
Or when we write medium, it will be written in this format.

57
00:05:33,070 --> 00:05:37,210
And this is how you can actually write it in a longer format.

58
00:05:38,310 --> 00:05:43,560
So instead of writing medium, we can define it to be long like this.

59
00:05:49,940 --> 00:05:52,270
And the result will be the same again.

60
00:05:54,050 --> 00:05:57,170
Now, it's already defined this way and angular.

61
00:05:59,130 --> 00:06:00,670
We can always use a shortcut.

62
00:06:02,230 --> 00:06:07,930
So looking at this from here, these letters indicate the month, year to date or time.

63
00:06:09,720 --> 00:06:12,270
For example, we'll use the short date format.

64
00:06:13,200 --> 00:06:15,000
And we'll write it briefly.

65
00:06:16,090 --> 00:06:19,780
And will write the long use like here.

66
00:06:21,720 --> 00:06:25,150
And as you can see, they both give us the same result, right?

67
00:06:27,730 --> 00:06:34,030
And we could always write something different if we want to hear, for example, let's only add the

68
00:06:34,030 --> 00:06:40,090
month and day information, or we can always had the time information here.

69
00:06:41,620 --> 00:06:47,060
All right, so you can play around with that yourselves, so that's how you use pipes.

70
00:06:47,680 --> 00:06:49,060
I want to see in the next lesson.
