Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,480 --> 00:00:01,050
Hey, guys.
2
00:00:01,230 --> 00:00:07,590
In the last lecture, we did the cleanup in our code in this lecture will improve our error messaging.
3
00:00:08,640 --> 00:00:10,590
So let's start what we have currently.
4
00:00:10,920 --> 00:00:16,410
And if you sign up without any details, that is blank error US alert, it is not that great.
5
00:00:16,710 --> 00:00:18,420
It's not a bad, though.
6
00:00:18,420 --> 00:00:20,250
It's not just good enough for us.
7
00:00:20,910 --> 00:00:22,250
OK, so let's improve it.
8
00:00:22,260 --> 00:00:25,590
Let's open here in your tap and we will install a your package.
9
00:00:26,130 --> 00:00:33,180
So what you are looking for is a package called The View that toast ification view dash dolls.
10
00:00:33,180 --> 00:00:36,660
The fake funnel like it is, you will search it.
11
00:00:37,590 --> 00:00:38,130
You should find.
12
00:00:38,130 --> 00:00:38,400
Here it is.
13
00:00:38,400 --> 00:00:43,810
GitHub repository view that notification or you can go to this npm here.
14
00:00:44,270 --> 00:00:45,710
View that ossification app.
15
00:00:46,890 --> 00:00:48,150
OK, let's see if we need to install.
16
00:00:48,150 --> 00:00:52,590
The version of For Our Just Trade is a for a view to, as you can see here.
17
00:00:53,870 --> 00:00:58,370
OK, let me take a look at these, these dates shall be also for a to trace some of their.
18
00:00:59,470 --> 00:01:03,850
Using your tree, you should instead have your diversification of version two instead.
19
00:01:03,880 --> 00:01:05,620
OK, so I was in the wrong package in the end.
20
00:01:05,620 --> 00:01:09,220
So let's take care of your top certification aversion to will show you around.
21
00:01:09,400 --> 00:01:09,820
Here it is.
22
00:01:10,990 --> 00:01:16,600
GitHub dot com slash more on slash viewed ossification slash three slash next.
23
00:01:16,900 --> 00:01:21,700
This is, of course, included also in the resources, but I am pretty sure you can find out by yourself.
24
00:01:23,080 --> 00:01:25,130
OK, so let's see what we need to install.
25
00:01:25,130 --> 00:01:26,020
Let's go down.
26
00:01:27,780 --> 00:01:30,480
OK, let's go down and down here.
27
00:01:30,750 --> 00:01:33,090
OK, so first, we need to start off guard.
28
00:01:33,090 --> 00:01:35,490
Let's copy installation command here it one.
29
00:01:37,420 --> 00:01:43,570
OK, let's go, Pete, let's get back to our terminology and open your tap here, and let's face it
30
00:01:43,570 --> 00:01:48,040
here about it is we can take a look what we need to do.
31
00:01:49,270 --> 00:01:55,450
OK, so they need to import those, they need to register it as a plugin.
32
00:01:55,930 --> 00:01:57,910
Then they need to import cassettes.
33
00:01:58,180 --> 00:02:01,650
OK, simple enough then, but we want to use it.
34
00:02:01,700 --> 00:02:04,870
We will simply import to use dolls.
35
00:02:04,900 --> 00:02:05,490
OK.
36
00:02:05,770 --> 00:02:11,270
Nothing hard here to get to those interfaces will import to your stores.
37
00:02:11,500 --> 00:02:13,840
OK, let's look at me east and I can call here.
38
00:02:13,840 --> 00:02:14,330
Toast.
39
00:02:14,350 --> 00:02:15,100
I am a toast.
40
00:02:15,610 --> 00:02:16,120
OK.
41
00:02:16,480 --> 00:02:17,890
Also looks simple enough.
42
00:02:19,430 --> 00:02:21,430
OK, and you have different methods you can use.
43
00:02:21,460 --> 00:02:23,620
You have a toaster, not even four.
44
00:02:23,650 --> 00:02:27,280
You have also toaster sacks says you have toast error and so on.
45
00:02:28,630 --> 00:02:30,850
OK, in this store, you can do it like this.
46
00:02:31,900 --> 00:02:33,340
OK, I'll use a toast.
47
00:02:33,760 --> 00:02:35,200
You've already straight.
48
00:02:36,410 --> 00:02:39,620
OK, you will call it OK, also simple enough.
49
00:02:41,930 --> 00:02:47,390
OK, let me see if we have a demo, here is a demo here, a live demo page so we can click here.
50
00:02:47,690 --> 00:02:49,910
Let me see if that will be available here.
51
00:02:49,910 --> 00:02:52,400
So the national certification don't matter.
52
00:02:52,420 --> 00:02:54,410
Not to toot def Shout-outs.
53
00:02:54,440 --> 00:02:54,920
Click here.
54
00:02:55,820 --> 00:02:57,500
And that's how the toast looks like.
55
00:02:57,950 --> 00:03:01,880
So we can see that I'm calling here this glass and toast and providing here this message.
56
00:03:01,880 --> 00:03:03,410
And here are some couple of properties.
57
00:03:03,620 --> 00:03:05,870
A lot of them are provided by default already.
58
00:03:06,980 --> 00:03:11,030
OK, you can hear the topic looks like everything can set it up as you want, and this will generate
59
00:03:11,030 --> 00:03:12,890
you how you should call your toast.
60
00:03:13,170 --> 00:03:14,000
It is a success.
61
00:03:14,430 --> 00:03:17,240
It is a default type, benevolent or sexist double click here.
62
00:03:18,230 --> 00:03:19,280
On the right side, it will change.
63
00:03:19,280 --> 00:03:24,890
You see the styles of Texas and message and some options and short tones and should be green.
64
00:03:26,310 --> 00:03:31,680
OK, guys, so that's how it is, and now it's time for implementation, and I just was talking a lot.
65
00:03:31,920 --> 00:03:35,970
So just let's implement this, I will go back and we just go simple step by step.
66
00:03:36,270 --> 00:03:37,590
So we'll start in the installation.
67
00:03:37,590 --> 00:03:38,340
Step up here.
68
00:03:40,750 --> 00:03:43,420
OK, I find it very it was.
69
00:03:45,200 --> 00:03:45,620
Here.
70
00:03:46,070 --> 00:03:48,820
OK, so maybe will get to import those.
71
00:03:48,920 --> 00:03:50,600
Let's get these this line here.
72
00:03:50,600 --> 00:03:51,940
Let's go back to called.
73
00:03:52,220 --> 00:03:57,340
Let's go to main lodges in Amando Jezreel import here.
74
00:03:57,380 --> 00:04:02,350
Those that can import it, let's say here is up the road.
75
00:04:02,930 --> 00:04:05,030
We can have it under the store at the post here.
76
00:04:05,510 --> 00:04:09,770
OK, we'll use here is storage is there out there and use.
77
00:04:11,110 --> 00:04:13,350
Uh, dozed.
78
00:04:15,730 --> 00:04:20,620
OK, well, what we are missing, you see, is see us says, of course, because this is using its own
79
00:04:20,620 --> 00:04:21,220
space, it's telling.
80
00:04:21,220 --> 00:04:23,110
So it's in pursuit of certifications.
81
00:04:23,980 --> 00:04:27,640
And Xia says, Go back here and let's paste it.
82
00:04:27,640 --> 00:04:30,120
And there are WTO certification here.
83
00:04:30,490 --> 00:04:31,050
You OK?
84
00:04:32,550 --> 00:04:38,370
Perfect, so we have this now what they are going to do, guys will create a separate module for art
85
00:04:39,180 --> 00:04:39,940
functionality.
86
00:04:40,350 --> 00:04:40,710
OK.
87
00:04:41,830 --> 00:04:47,530
So I will go to our modules in a store on the left side modules and create here a new module and we'll
88
00:04:47,530 --> 00:04:49,180
call it Toast module.
89
00:04:49,450 --> 00:04:51,130
OK, so toast dodges.
90
00:04:52,600 --> 00:04:57,070
You know, it also jazz, you know, all this stuff would be all done before, does it export default
91
00:04:57,070 --> 00:04:57,850
empty object?
92
00:04:57,920 --> 00:04:58,480
Oh, it's right here.
93
00:04:58,480 --> 00:05:05,920
Namespace to be true name space to be to make sure you're not making any typos here and it'll have your
94
00:05:05,920 --> 00:05:08,470
actions will have the for now.
95
00:05:08,470 --> 00:05:14,230
Does it to extend will ever action to display at the error message and action to display sexist message?
96
00:05:14,950 --> 00:05:15,310
OK.
97
00:05:16,340 --> 00:05:24,050
So the idea for a for a first let's the first one will be success or rather success like this, the
98
00:05:24,050 --> 00:05:25,100
second a little bit better.
99
00:05:26,240 --> 00:05:31,370
What you need to do in order to display the message, you need the message value itself.
100
00:05:31,370 --> 00:05:36,380
So first is for context, second, just value a placeholder for it because I will be not using this
101
00:05:36,390 --> 00:05:36,620
value.
102
00:05:36,620 --> 00:05:39,620
Does that empty underscore?
103
00:05:40,220 --> 00:05:41,790
And a second value will be the message.
104
00:05:42,140 --> 00:05:42,950
The error message?
105
00:05:44,050 --> 00:05:47,380
OK, and the same thing here, the error underscored a message.
106
00:05:48,920 --> 00:05:53,750
In the examples I showed you in their GitHub, how we can get access to the toast is with a vote or
107
00:05:53,750 --> 00:05:56,660
certification, a function called use toast.
108
00:05:57,380 --> 00:06:00,740
So up here I will import here in the curly brackets to use toast.
109
00:06:01,430 --> 00:06:06,530
You can get from the Bluetooth certification and they will simply ride your concert toast.
110
00:06:08,930 --> 00:06:13,700
All right, and he will get your access to that, also use those, you know, like perfect.
111
00:06:14,480 --> 00:06:20,090
Now you have your toast and you can now dispatch there, you can display the error and the access to
112
00:06:20,090 --> 00:06:22,100
the functions called error and the success.
113
00:06:22,490 --> 00:06:29,060
So in the case of a successive override, a toast dot success and you will write your message about
114
00:06:29,090 --> 00:06:32,990
a message and a similar to the error, your caller here toast dot error.
115
00:06:34,690 --> 00:06:40,390
Perfect now they have accents for success, and the startup's message is they can register a toast to
116
00:06:40,390 --> 00:06:42,590
module in our main main module.
117
00:06:42,610 --> 00:06:48,580
So in the starter folder index suggests let's import your toast module.
118
00:06:48,580 --> 00:06:51,070
Import toast from modules toast.
119
00:06:52,240 --> 00:06:54,010
And let's get here to the modules perfect.
120
00:06:54,040 --> 00:06:56,500
Now they have access to it and we can do special elections.
121
00:06:58,040 --> 00:07:02,840
OK, so let's do this better, the -- of Florida, beginning of envy, getting an error, so when
122
00:07:02,840 --> 00:07:09,950
we are getting that or go back to your story, go back to your user touches and we are getting here
123
00:07:10,310 --> 00:07:12,030
error in the catch.
124
00:07:12,050 --> 00:07:12,380
Right.
125
00:07:12,380 --> 00:07:16,550
So the other thing that I use the error to be the error message and what we can do next, we can simply
126
00:07:16,550 --> 00:07:18,800
hear dispatch the error.
127
00:07:20,210 --> 00:07:23,610
OK, so a comment here, and I will dispatch here, so we don't have here dispatch.
128
00:07:23,960 --> 00:07:30,320
You can get a dispatch in the action itself so I can write your comment and from the context we can
129
00:07:30,320 --> 00:07:34,910
get also dispatch like this and I can dispatch here new action.
130
00:07:36,830 --> 00:07:38,120
OK, this will be maybe.
131
00:07:39,740 --> 00:07:45,950
Maybe different as the previous dispatch that their dispatch and the initial specify here module.
132
00:07:47,200 --> 00:07:52,480
Your action, so they are calling it the election, remember, in a toast module, they have an error
133
00:07:52,480 --> 00:07:52,810
here.
134
00:07:54,330 --> 00:07:59,940
OK, so you are dispatching toasts at your property value for the action, which is their error message,
135
00:08:00,150 --> 00:08:01,230
error message.
136
00:08:01,950 --> 00:08:03,780
And you need to specify here one more thing.
137
00:08:04,680 --> 00:08:07,860
You know, specify here are there ought to be true.
138
00:08:10,140 --> 00:08:15,180
OK, so I am specifying growth to be true, if you will, to divide this thing here growth through.
139
00:08:15,660 --> 00:08:20,700
You will try to dispatch action those sorts error, but they would look for it for the action here in
140
00:08:20,700 --> 00:08:26,190
this module, here in the user module bulb anymore, the route through you will look all of your other
141
00:08:26,190 --> 00:08:30,960
modules and you will look for the toast module in also other modules for this action.
142
00:08:31,710 --> 00:08:36,720
So make sure you need to be sure when you are dispatching actions from outside of your current module
143
00:08:36,750 --> 00:08:39,150
that you will specify your property to be true.
144
00:08:41,030 --> 00:08:46,280
OK, so now, guys, whenever you look at the Arrow Valley, you are registering and they will jump
145
00:08:46,280 --> 00:08:48,340
to the catch block, you build this page here.
146
00:08:48,350 --> 00:08:50,900
Action error with the error message.
147
00:08:51,470 --> 00:08:54,310
This will go to your module is called error.
148
00:08:54,590 --> 00:09:00,110
The error message you will receive here and you will call the function error, which will display the
149
00:09:00,110 --> 00:09:00,350
top.
150
00:09:02,120 --> 00:09:06,800
Now, I know it will be a little bit longer like short of changes go to.
151
00:09:08,600 --> 00:09:14,550
Go to register to view and to hear as you watch there is processing, you're done.
152
00:09:15,200 --> 00:09:16,640
OK, this can we can live here.
153
00:09:16,640 --> 00:09:18,140
So for our dog, we'll be changing it.
154
00:09:18,140 --> 00:09:21,170
But for error you definitely don't need because we are handling it.
155
00:09:22,280 --> 00:09:26,000
So ed, we don't need the washer now.
156
00:09:26,000 --> 00:09:27,280
That was the older of the changes.
157
00:09:27,290 --> 00:09:27,980
We can save it.
158
00:09:28,190 --> 00:09:29,390
Let's go to our browsers.
159
00:09:31,190 --> 00:09:33,800
Let's go to our application refresh here, just in a case.
160
00:09:33,800 --> 00:09:37,500
Let's click here to sign up and you should see here firebase that out.
161
00:09:37,610 --> 00:09:38,600
Invalid email.
162
00:09:39,500 --> 00:09:43,610
OK, so now we are displaying distilled messages.
163
00:09:44,580 --> 00:09:45,000
OK.
164
00:09:47,570 --> 00:09:52,100
OK, so that's how it works, we can we can continue the next lecture with more improvements of those
165
00:09:52,100 --> 00:09:53,600
guys that want more explanations.
166
00:09:53,600 --> 00:09:54,390
You can stay here.
167
00:09:54,410 --> 00:09:55,130
So simply.
168
00:09:56,180 --> 00:10:00,080
Well, what's happening here, but everybody's pitching ideas that they are calling the register election,
169
00:10:00,080 --> 00:10:04,580
right, so a user of been calling register, obviously registering, it's failing because we don't be
170
00:10:04,580 --> 00:10:05,930
able to provide any information.
171
00:10:05,940 --> 00:10:07,670
So this is this is failing.
172
00:10:07,670 --> 00:10:10,730
We are jumping into the catch and here we are dispatching.
173
00:10:10,730 --> 00:10:15,770
So I volunteer a debugger to show you all right and the dose of the bucket right here.
174
00:10:17,950 --> 00:10:18,470
Okay.
175
00:10:18,700 --> 00:10:21,130
And that simple, I think what's happening.
176
00:10:22,730 --> 00:10:30,020
Many of us sign up one more time, sign up and you'll see at our message, that's what you're getting
177
00:10:30,020 --> 00:10:32,960
here, our message and venue of this particular error.
178
00:10:33,970 --> 00:10:36,370
Like, here you are getting this error message here.
179
00:10:37,020 --> 00:10:42,020
Firebase error and you are just going to hit that error, which will display this on the screen.
180
00:10:42,490 --> 00:10:44,170
And that's that's basically it.
181
00:10:46,330 --> 00:10:49,870
OK, let's start with this is the backyard, we don't need them, I am pretty sure now it's pretty clear
182
00:10:49,870 --> 00:10:52,720
if the all clear feel free to ask.
183
00:10:53,840 --> 00:10:59,910
I'll open, I have always provide you explanation as if you need so.
184
00:11:01,650 --> 00:11:05,670
OK, let's go into next lecture, we'll be working on some of your things I hope to see with there,
185
00:11:05,670 --> 00:11:05,910
guys.
186
00:11:05,910 --> 00:11:06,240
Cheers.
16937
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.