I see a lot of different implementations of Auth Guards around the web. The implementation is quite simple. In most cases, you will find yourself doing something like this: As you see, we need to repeat the same line of code whenever there is a new protected route. Of course, it’s not the end of the world, but we can do better and not write redundant configuration. Let’s use a componentless route
Now let’s create the service that will be responsible for fetching the posts from the server. Build the Posts Service — We need to listen to GET_POSTS action, then call our service and based on the response status to do the following thing: If the response is successful, dispatch GET_POSTS_SUCCESS action with the result.If the request fails, dispatch GET_POSTS_FAIL action with the error.These are
I have already published an article on the subject, but this time I want to take a different approach. The easiest way to understand what Subject is is to re-create one. Let’s create a simple version of Subject . Let’s look at the facts. Subject is both an Observable and Observer Subject is ObservableIt means he has all the operators (map, filter, etc. ) and you can subscribe to him. That’s all yo
One of my favorite libraries is Vue. There’s a cool feature in this library that I want to steal for my Angular projects — Event modifiers. From the Vue documentation —It is a very common need to call event.preventDefault() or event.stopPropagation() inside event handlers. Although we can do this easily inside methods, it would be better if the methods can be purely about data logic rather than ha
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く