From 5118599aaff4f9d2c06759d73210b671a2b060e5 Mon Sep 17 00:00:00 2001 From: Mike Huang Date: Wed, 3 Jan 2024 21:40:02 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20format=20document?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../angular-advanced-handle-http-request-with-interceptor.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/blog/angular-advanced-handle-http-request-with-interceptor.md b/src/assets/blog/angular-advanced-handle-http-request-with-interceptor.md index cad145167a..69260e7b67 100644 --- a/src/assets/blog/angular-advanced-handle-http-request-with-interceptor.md +++ b/src/assets/blog/angular-advanced-handle-http-request-with-interceptor.md @@ -125,7 +125,7 @@ export class NoopInterceptor implements HttpInterceptor { } ``` -由於HttpInterceptor其實是個介面而已,轉換成JavaScript時不會產生任何的程式碼,因此Angular提供了**InjectionToken**來產生一個空的實體,才不會導致我們要設定相依注入時沒有東西可以注入**(TypeScript的Interface對JavaScript等於沒有東西)** +由於HttpInterceptor其實是個介面而已,轉換成JavaScript時不會產生任何的程式碼,因此Angular提供了**InjectionToken**來產生一個空的實體,才不會導致我們要設定相依注入時沒有東西可以注入 **(TypeScript的Interface對JavaScript等於沒有東西)** 而NoopInterceptor則實作了HttpInterceptor介面,同時給了一個超簡單的程式碼,把原本送進來的request直接透過HttpHandler送出去而已!