Become a member
Sign in
Penghui Li
Penghui Li

Penghui Li

asmallmonster.com

35 Following
4 Followers
  • Profile
  • Claps
  • Responses

Latest

Penghui Li
Penghui Li
May 7 · 1 min read

Frontend: How to retry request with rxjs

No matter how good it your API, some requests can still fail. And when it fails, sometimes we want to retry it. This can be achieved with rxjs very easily.

Penghui Li
Penghui Li
Apr 28 · 1 min read

Frontend: how to implement “pull down to refresh” on mobile browser

On mobile browser, you can pull down the page, let it go, and the whole page will be refreshed.

But sometimes I only want to refresh the requests I want.
For example, I only want to see if…

Penghui Li
Penghui Li
Apr 25 · 1 min read

Frontend: How to make sure spinner always rotate full circles

Add a spinner button, and here are the requirements:
1. When it’s clicked, it should start rotate;
2. And some asynchronous tasks start;
3. When the tasks finish, stop the spinner;

Penghui Li
Penghui Li
Apr 11 · 5 min read

Angular: how to do forms

Angular’s reactive form is really good. Every form field is bound to a FormControl, and you get the field state or…

Penghui Li
Penghui Li
Apr 9 · 2 min read

Angular: Unit Test: Property based testing

Property based testing has a lot of benefits. So let’s also do that in Angular.
I use testcheck@1.0.0-rc.2

—
Check code here.
—