1
00:00:01,590 --> 00:00:02,350
Hello, everyone.

2
00:00:02,850 --> 00:00:07,500
So in this lesson, we're going to talk about working with modules in typescript.

3
00:00:09,480 --> 00:00:16,620
It's now, my friends, you you know that up until now we've created structures such as class and interface,

4
00:00:17,040 --> 00:00:24,600
we've extended or implemented them to different classes or we created objects from these classes.

5
00:00:25,300 --> 00:00:32,670
And as you can see here, generally, we worked on different files and I might want to use the class

6
00:00:32,670 --> 00:00:36,240
structure we created and in these different file.

7
00:00:36,960 --> 00:00:45,030
So in other words, I may want to use structures such as this class interface not only within the same

8
00:00:45,030 --> 00:00:47,850
file, but also within different files.

9
00:00:48,000 --> 00:00:49,050
You get what I mean.

10
00:00:49,560 --> 00:00:54,930
So here in order to use this class in different locations, in different environments, I'm going to

11
00:00:54,930 --> 00:00:57,150
have to export this class.

12
00:00:58,550 --> 00:01:02,390
So now I'll create a new tax file for this class.

13
00:01:06,780 --> 00:01:12,180
And I'm creating module's dots file in one.

14
00:01:17,400 --> 00:01:20,640
So as I move the class here into this file.

15
00:01:24,720 --> 00:01:27,360
I can access it from outside this class.

16
00:01:29,260 --> 00:01:31,090
So I write export at the beginning.

17
00:01:32,770 --> 00:01:36,550
And now we can use this class in a different file that we want to.

18
00:01:37,890 --> 00:01:42,840
And thanks to the export keyword, we're able to use it outside of this file.

19
00:01:44,900 --> 00:01:49,910
So, yeah, let's have a look at it, so when you look at it, you can see a simple example here.

20
00:01:50,830 --> 00:01:56,770
But the important thing is that you understand the logic, because we're going to want to use several

21
00:01:56,770 --> 00:02:01,440
different features in several different classes in this way throughout the course.

22
00:02:02,440 --> 00:02:05,890
So I want you to be able to use this without having any any trouble.

23
00:02:06,430 --> 00:02:06,750
All right.

24
00:02:07,360 --> 00:02:10,270
So now we're going to use this exporting class and the other file.

25
00:02:12,830 --> 00:02:16,610
So for this, I'll just open this file and write import.

26
00:02:19,380 --> 00:02:21,960
Then, right, the class name that will use an.

27
00:02:26,200 --> 00:02:34,810
And because these two files are in the same directory writing dot slash and the file name we're going

28
00:02:34,810 --> 00:02:35,140
to get.

29
00:02:37,020 --> 00:02:37,380
Right.

30
00:02:38,070 --> 00:02:38,800
So that's it.

31
00:02:38,910 --> 00:02:40,440
It's simple logic.

32
00:02:42,040 --> 00:02:46,210
That'll be enough for now because we're going to use this a lot throughout our course.

33
00:02:47,390 --> 00:02:55,700
Are you exhausted because we have exhausted the typescript topics and of course, we didn't go into

34
00:02:55,700 --> 00:03:01,580
depth with every single lesson, but we talked about everything that that that you're going to need

35
00:03:01,580 --> 00:03:02,390
to know.

36
00:03:03,550 --> 00:03:07,600
So if you want to go into more detail, you can always check out the typescript handbook.

37
00:03:08,850 --> 00:03:14,430
But pretty much I showed you all the necessary information for our cause and we're going to be able

38
00:03:14,430 --> 00:03:20,190
to continue throughout this course because this is all you need to know for Angular.

39
00:03:22,140 --> 00:03:28,980
So when you're ready, you have a little bit of a review if you need to, but I think you're ready in

40
00:03:28,980 --> 00:03:33,250
the next section, we're going to get into the introduction of ANGULAR.

41
00:03:33,540 --> 00:03:33,980
All right.

42
00:03:33,990 --> 00:03:35,660
So see you in the next lesson.
