Angular 14 現在時刻をリアルタイムで取得する

Angular 14 現在時刻をリアルタイムで取得する

主な技術はangular Rxjsで非同期にデータを取得する
他人が書いたものは本当に許せないので自分で書くしかない…
test01.component.html

{
  
   
   {date_now}}

test01.component.ts

import {
   
    
     Component, OnInit } from '@angular/core';
import {
   
    
     Observable } from 'rxjs';

おすすめ

転載: blog.csdn.net/qq_39962271/article/details/126605193