காட்டு
0:01
S… Speaker 1 (241. Providing the Recipe Service Correctly)
The bug we recognized in the last lecture is a pretty mean one.
0:05
S… Speaker 1 (241. Providing the Recipe Service Correctly)
If we add a new recipe here,
0:08
S… Speaker 1 (241. Providing the Recipe Service Correctly)
we hit save and
0:12
S… Speaker 1 (241. Providing the Recipe Service Correctly)
we go to shopping list and go back,
0:15
S… Speaker 1 (241. Providing the Recipe Service Correctly)
you see it's lost,
0:16
S… Speaker 1 (241. Providing the Recipe Service Correctly)
it's gone.
0:17
S… Speaker 1 (241. Providing the Recipe Service Correctly)
Again,
0:18
S… Speaker 1 (241. Providing the Recipe Service Correctly)
test,
0:19
S… Speaker 1 (241. Providing the Recipe Service Correctly)
test and gone.
0:22
S… Speaker 1 (241. Providing the Recipe Service Correctly)
So what's happening here?
0:23
S… Speaker 1 (241. Providing the Recipe Service Correctly)
The issue we encounter here
0:28
S… Speaker 1 (241. Providing the Recipe Service Correctly)
is that we provide our recipes service in
0:32
S… Speaker 1 (241. Providing the Recipe Service Correctly)
the recipes component.
0:33
S… Speaker 1 (241. Providing the Recipe Service Correctly)
So all the components in this area share the
0:37
S… Speaker 1 (241. Providing the Recipe Service Correctly)
same instance.
0:38
S… Speaker 1 (241. Providing the Recipe Service Correctly)
But if we navigate away to the shopping list area,
0:42
S… Speaker 1 (241. Providing the Recipe Service Correctly)
the recipes component is destroyed and so is
0:46
S… Speaker 1 (241. Providing the Recipe Service Correctly)
the instance of this service.
0:48
S… Speaker 1 (241. Providing the Recipe Service Correctly)
So what we need to do to ensure that our service survives
0:52
S… Speaker 1 (241. Providing the Recipe Service Correctly)
is we need to add it to our app module here.
0:57
S… Speaker 1 (241. Providing the Recipe Service Correctly)
By adding it here,
0:58
S… Speaker 1 (241. Providing the Recipe Service Correctly)
recipes service,
1:00
S… Speaker 1 (241. Providing the Recipe Service Correctly)
recipe service,
1:02
S… Speaker 1 (241. Providing the Recipe Service Correctly)
and adding the import to,
1:04
S… Speaker 1 (241. Providing the Recipe Service Correctly)
we make sure that now we have one instance
1:08
S… Speaker 1 (241. Providing the Recipe Service Correctly)
of the service all the time available as long as our app is running.
1:12
S… Speaker 1 (241. Providing the Recipe Service Correctly)
So now if we add the spaghetti one
1:16
S… Speaker 1 (241. Providing the Recipe Service Correctly)
more time with our beautiful image,
1:18
S… Speaker 1 (241. Providing the Recipe Service Correctly)
very tasty as mentioned before,
1:22
S… Speaker 1 (241. Providing the Recipe Service Correctly)
and I hit save.
1:24
S… Speaker 1 (241. Providing the Recipe Service Correctly)
Now, if I come back,
1:25
S… Speaker 2 (241. Providing the Recipe Service Correctly)
it's still there.
1:27
S… Speaker 1 (241. Providing the Recipe Service Correctly)
And as you can see,
1:28
S… Speaker 1 (241. Providing the Recipe Service Correctly)
I can still edit it.
1:29
S… Speaker 1 (241. Providing the Recipe Service Correctly)
So this is now working.
1:31
S… Speaker 1 (241. Providing the Recipe Service Correctly)
Now we can try putting it to the shopping list,
1:34
S… Speaker 1 (241. Providing the Recipe Service Correctly)
which of course doesn't add.
1:35
S… Speaker 1 (241. Providing the Recipe Service Correctly)
We first of all have to add some ingredients like spaghetti.
1:39
S… Speaker 1 (241. Providing the Recipe Service Correctly)
But now this is working as expected.
1:42
S… Speaker 2 (241. Providing the Recipe Service Correctly)
Well,
1:43
S… Speaker 2 (241. Providing the Recipe Service Correctly)
almost.
1:44
S… Speaker 1 (241. Providing the Recipe Service Correctly)
With the remaining bug.
1:48
S… Speaker 1 (241. Providing the Recipe Service Correctly)
that here,
1:48
S… Speaker 1 (241. Providing the Recipe Service Correctly)
once we click this X button,
1:50
S… Speaker 1 (241. Providing the Recipe Service Correctly)
we're not deleting the ingredient.
1:53
S… Speaker 1 (241. Providing the Recipe Service Correctly)
So that is something we should also have a look at.

இந்த ஒலிப்பதிவு AI (தானியங்கி பேச்சு அடையாளம்) மூலம் உருவாக்கப்பட்டது. பிழைகள் இருக்கலாம் - முக்கியமான பயன்பாட்டுக்கு மூல ஒலியை சரிபார்க்கவும். AI கொள்கை

❤️ STT.ai ஐ நேசிக்கிறீர்களா? உங்கள் நண்பர்களுக்குச் சொல்லுங்கள்!
சுருக்கம்
இந்த நகலெடுப்புக்கான AI சுருக்கத்தை உருவாக்க சுருக்கம் என்பதை க்ளிக் செய்யவும்.
சுருக்கப்படுகிறது...
இந்த நகலை AI க்குக் கேட்கவும்
இந்த நூலைப் பற்றி ஏதாவது கேட்கவும் - AI தொடர்புடைய பகுதிகளைக் கண்டுபிடித்து பதிலளிக்கும்.