120. Setting up the Services
Jul 15, 2026 05:14
· 1:15
· English
· Whisper Turbo
· 2 གསལ་བཤད་
ཡིག་ཆ་འདི་ཕྱི་ཚེས་ ༡༥ ཉིན་མཇུག་བསྡུ་ནི་ཨིན་མས།
གནས་བརྟན་གྱི་གནས་བཞག་གོང་འཕེལ་བཏང། →
སྟོན་རྐྱངམ་ཅིག་
0:02
S…
Speaker 2 (120. Setting up the Services)
So let's add some services manually.
0:05
S…
Speaker 2 (120. Setting up the Services)
Now we should place services next
0:09
S…
Speaker 2 (120. Setting up the Services)
to the feature or in the folder holding the feature they belong to.
0:12
S…
Speaker 2 (120. Setting up the Services)
So if we create a recipe service,
0:15
S…
Speaker 2 (120. Setting up the Services)
the recipes folder looks like a good place for it.
0:19
S…
Speaker 2 (120. Setting up the Services)
So here I'll add a recipe service and
0:23
S…
Speaker 2 (120. Setting up the Services)
of course the file is named recipe .service .ts due
0:27
S…
Speaker 1 (120. Setting up the Services)
to that.
0:28
S…
Speaker 2 (120. Setting up the Services)
And here I will simply export a class which is named RecipeService.
0:32
S…
Speaker 1 (120. Setting up the Services)
Remember,
0:32
S…
Speaker 2 (120. Setting up the Services)
a service simply is a TypeScript class.
0:35
S…
Speaker 2 (120. Setting up the Services)
You don't need to add any special decorator to it,
0:38
S…
Speaker 2 (120. Setting up the Services)
at least not if you don't plan on injecting a service into the service.
0:43
S…
Speaker 2 (120. Setting up the Services)
Well, and the same for the shopping list service.
0:46
S…
Speaker 2 (120. Setting up the Services)
I'll place it in the shopping list folder.
0:49
S…
Speaker 2 (120. Setting up the Services)
Here I'll name it shopping list .service
0:53
S…
Speaker 2 (120. Setting up the Services)
.ts.
0:54
S…
Speaker 1 (120. Setting up the Services)
That's the file name.
0:55
S…
Speaker 2 (120. Setting up the Services)
And then inside the file,
0:57
S…
Speaker 2 (120. Setting up the Services)
of course, I'll export a class named shopping list service.
1:01
S…
Speaker 2 (120. Setting up the Services)
So these are the two service files.
1:04
S…
Speaker 2 (120. Setting up the Services)
Now let's start working on the recipe service
1:09
S…
Speaker 1 (120. Setting up the Services)
first.
1:09
S…
Speaker 2 (120. Setting up the Services)
Let's start working on it in the next lecture.
ཡིག་སྒྱུར་འདི་ བཅོས་མའི་བློ་རིག་ (སྒྲ་ངོས་འཛིན་བྱེད་པའི་འཕྲུལ་རིག་) གིས་བཟོ་སྟེ་ཡོདཔ་ཨིན། འཛོལ་བ་འབྱུང་སྲིད་པ་ལ་ — གལ་སྲིད་ཁག་ཆེ་བའི་དོན་ལས་ ངོ་མ་གི་སྒྲ་སྐད་དང་འཕྱད་ཞིབ་འབད་དགོཔ་ཨིན། བཅོས་མའི་བློ་རིག་གི་སྲིད་བྱུས་
བཅུད་དོན་
ཡིག་ཆ་འདི་གི་ AI བཅུད་བསྡུ་ཐོན་ནི་གི་དོན་ལས་ བཅུད་བསྡུ་ ཟེར་བའི་བསྒང་འདི་བསྒང་བསྒ
དྲན་ཐོ་བསྡུ་གསོག...
དྲན་ཤེས་ལ་དྲི་བ་དྲིས་ལན་ཞུ།
ཡིག་ཆ་འདི་གི་སྐོར་ལ་དྲི་བ་ཅི་རིགས་ཞུས་ནའང་ བཅོས་མའི་བློ་རིག་གིས་ འབྲེལ་བ་ཡོད་པའི་དོན་ཚན་ཚུ་ འཚོལ་ཞིབ་ དང་ལན་འདེབས་ འབད་འོང་།