Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- scroll
- formgroup
- 앵귤러 애니메이션
- modal
- angular animation
- angular modal
- Oracle LISTAGG 사용 예시
- angular route
- egov spring ajax 사용 예시
- 모달
- route
- ajax 사용 예시
- mysql if
- 옵저버블
- 셀렉트박스 커스텀
- Angular Router
- 아이오닉 스크롤 이벤트
- 스크롤 이벤트 감지
- 호버
- Router
- flex-1
- 앵귤러 모달
- angular button
- prisma
- Ionic modal
- summary
- TAILWIND
- 스크롤 이벤트
- 검색
- ApexChart
Archives
- Today
- Total
깜놀하는 해므찌로
typescript static 정적 변수 활용 예시 본문
반응형
SMALL
class Car{
#privat:number = 30;
protected protect:string = "protected";
readonly name:string = "Car"; // readonly 수정 불가능
static staticName = "정적 변수";
// color:string;
constructor(public readonly color:string, name:string){
this.color = color;
this.name = name; // readonly 수정할 수 있도록 생성자에서 처리
}
start(){
console.log("start");
console.log(this.#privat); // private
console.log(Car.staticName); // static 변수 사용 시 this 대신 class이름 사용
}
}
반응형
LIST
'IT' 카테고리의 다른 글
Angular 의존성 주입 예시 (0) | 2023.05.26 |
---|---|
Uncaught (in promise): NullInjectorError: R3InjectorError(Standalone[LayoutPage])[HttpService -> HttpService -> HttpService -> HttpClient -> HttpClient]: 에러 해결 (0) | 2023.05.25 |
Tailwind 단어 단위 줄바꿈 CSS (0) | 2023.05.24 |
typescript readonly 활용 예시 (0) | 2023.05.24 |
@Observable @subscribe() (0) | 2023.05.23 |