കാണിക്കല്‍ മാത്രം.
0:02
S… Speaker 1 (107. Module Introduction)
Welcome to a new module in this course.
0:04
S… Speaker 1 (107. Module Introduction)
This module is about services and dependency injection.
0:09
S… Speaker 2 (107. Module Introduction)
Now,
0:09
S… Speaker 1 (107. Module Introduction)
what is that?
0:12
S… Speaker 1 (107. Module Introduction)
Let's start with services.
0:13
S… Speaker 1 (107. Module Introduction)
What are services?
0:15
S… Speaker 1 (107. Module Introduction)
Let's consider this application.
0:17
S… Speaker 1 (107. Module Introduction)
We get an app component,
0:19
S… Speaker 1 (107. Module Introduction)
an about component,
0:20
S… Speaker 1 (107. Module Introduction)
an user component,
0:21
S… Speaker 1 (107. Module Introduction)
and a user detail component.
0:23
S… Speaker 2 (107. Module Introduction)
Now,
0:24
S… Speaker 1 (107. Module Introduction)
we might have some methods in those components.
0:27
S… Speaker 1 (107. Module Introduction)
Let's say we want to log some data to the console in the about
0:31
S… Speaker 1 (107. Module Introduction)
component and in the user detail component.
0:34
S… Speaker 1 (107. Module Introduction)
And somehow this log statement is pretty similar.
0:37
S… Speaker 1 (107. Module Introduction)
So pretty much the same text.
0:39
S… Speaker 1 (107. Module Introduction)
So we're basically repeating ourselves here.
0:41
S… Speaker 1 (107. Module Introduction)
We're duplicating code in two different components.
0:44
S… Speaker 1 (107. Module Introduction)
Let's say in the user component,
0:47
S… Speaker 1 (107. Module Introduction)
we also want to access some data,
0:50
S… Speaker 1 (107. Module Introduction)
some array of users maybe.
0:51
S… Speaker 1 (107. Module Introduction)
And maybe we also don't know if we will later use
0:55
S… Speaker 1 (107. Module Introduction)
that in some other part of our application.
0:57
S… Speaker 1 (107. Module Introduction)
Both use cases.
1:00
S… Speaker 1 (107. Module Introduction)
duplication of code,
1:01
S… Speaker 1 (107. Module Introduction)
and data storage,
1:04
S… Speaker 1 (107. Module Introduction)
providing data,
1:05
S… Speaker 1 (107. Module Introduction)
are typical use cases for a service,
1:08
S… Speaker 1 (107. Module Introduction)
because a service is basically just another piece in your Angular
1:12
S… Speaker 1 (107. Module Introduction)
app, another class you can add,
1:14
S… Speaker 1 (107. Module Introduction)
which acts as a central repository,
1:17
S… Speaker 1 (107. Module Introduction)
as a central business unit,
1:20
S… Speaker 1 (107. Module Introduction)
you could say, something where you can store,
1:21
S… Speaker 1 (107. Module Introduction)
where you can centralize your code in.
1:24
S… Speaker 1 (107. Module Introduction)
So we could create a log service,
1:26
S… Speaker 1 (107. Module Introduction)
for example, to centralize our log statement.
1:29
S… Speaker 1 (107. Module Introduction)
We could create a user service to manage the data storage here.
1:33
S… Speaker 1 (107. Module Introduction)
Let's see this in a real app so that it becomes more clear though.

ഈ അക്ഷം AI (സ്വയമുണ്ടായി അക്ഷരാനുഗ്രഹം) ഉണ്ടാക്കിയത്. പിശകുകള്‍ ഉള്‍ക്കൊള്ളാം. അല്ലെങ്കില്‍ മൂല ഓഡിയോ ഉപയോഗിക്കുന്നതിനു് മുന്‍കൂട്ടിയുള്ള പിശകുകള്‍ സ്ഥിതീകരിക്കാം. ഐഐ നയം

❤️ സ്നേഹം STT.ai? കൂട്ടുകാരോട് പറയൂ!
സാരാംശം
ഈ അക്ഷരമാലയുടെ AI സമ്മറി ഉണ്ടാക്കാന്‍ കെസ്റ്റെല്‍ ക്ലിക്ക് ചെയ്യുക.
സഖാവ്...
ഈ ട്രാന്‍സ്പെക്റ്റിനെ കുറിച്ച് AI ചോദിയ്ക്കുക
ഈ പുസ്‌തകത്തെക്കുറിച്ച് എന്തെങ്കിലും ചോദിക്കുക — AI - ന്‌ ആവശ്യമായ ഭാഗങ്ങൾ കണ്ടെത്തുകയും ഉത്തരം നൽകുകയും ചെയ്യും.