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 |
Tags
- scroll
- Angular Router
- egov spring ajax 사용 예시
- prisma
- angular button
- 스크롤 이벤트
- TAILWIND
- modal
- 옵저버블
- Router
- 모달
- angular modal
- formgroup
- route
- Ionic modal
- angular animation
- 검색
- 앵귤러 애니메이션
- mysql if
- flex-1
- ajax 사용 예시
- 앵귤러 모달
- ApexChart
- 아이오닉 스크롤 이벤트
- 스크롤 이벤트 감지
- 셀렉트박스 커스텀
- angular route
- summary
- 호버
- Oracle LISTAGG 사용 예시
Archives
- Today
- Total
깜놀하는 해므찌로
typescript abstract, extends 추상 클래스 활용 예시 본문
반응형
SMALL
/** 추상 클래스
* 추상화 : 상위 클래스에서 이름과 형태만 정해줄 뿐 상속받는 하위 클래스에서 구현하는 것
*/
abstract class Car{
color:string;
constructor(color:string){
this.color = color;
};
start():void{
console.log("start");
};
abstract doSomething():void // 추상 메소드 명시
}
// 추상 클래스 new 생성 불가, 오로지 상속을 통해서만 사용 가능
class Bmw extends Car{
constructor(color:string){
super(color);
};
doSomething(){ // 추상 메소드 구현
console.log("추상클래스 상속을 받을 경우 선언된 메소드는 반드시 구현을 해야 함")
}
}
반응형
LIST
'IT' 카테고리의 다른 글
Angular Animation condition 앵귤러 애니메이션 조건 예시 (0) | 2023.05.27 |
---|---|
Error: Process completed with exit code 1. 배포 에러 해결 (0) | 2023.05.26 |
git submodule / submodule add 방법 예시 (0) | 2023.05.26 |
Angular 의존성 주입 예시 (0) | 2023.05.26 |
Uncaught (in promise): NullInjectorError: R3InjectorError(Standalone[LayoutPage])[HttpService -> HttpService -> HttpService -> HttpClient -> HttpClient]: 에러 해결 (0) | 2023.05.25 |