angular2 템플릿에서 정적 함수 호출 저는 각진 프로젝트를 위한 '유틸리티' 서비스(클래스)를 구축하려고 합니다.유틸리티 클래스에는 정적 기능이 있으므로 불필요한 개체를 인스턴스화할 필요가 없습니다.한 가지 예는 다음과 같습니다. import { Injectable } from '@angular/core'; @Injectable() export class DateService { constructor() { } public static parseDate(dateString: string): Date { if (dateString) { return new Date(dateString); } else { return null; } } } 구성 요소 클래스 파일에서 다음과 같이 가져옵니다. import ..