typescript IF_06_05_home.page.ts_3

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了typescript IF_06_05_home.page.ts_3相关的知识,希望对你有一定的参考价值。

\!h posts: any[] = [];

constructor(httpClient: HttpClient){

    // Making the GET request
    httpClient.get("https://jsonplaceholder.typicode.com/posts").subscribe((response) => {

      // Request succeeded
\!h       console.log(response)
\!h       this.posts = response as any[];

    }, (error) => {

      // Request failed with an error
\!h       console.log(error);
    })
  }

以上是关于typescript IF_06_05_home.page.ts_3的主要内容,如果未能解决你的问题,请参考以下文章

typescript IF_06_03_home.page.ts_1

typescript IF_05_10_Popover_Home_TS

typescript IF_05_07_Modal_Home_TS

typescript IF_05_07_NavigationService_Home_TS

typescript IF_05_03_Home_GoForward_TS

typescript IF_05_14_Tabs_Home_Module_TS