반응형
문제
jhipster 를 최신버전으로 업그레이드 했더니 아래와 같은 에러가 난다..
jhipster에서 자동으로 만들어준부분인데 typescript버전 올라가면서 타입체크하는데서 에러가나는거 같다.
해결법
해당 에러 줄에 아래와같이 컴포넌트 클래스 이름뒤에 as Component를 붙여준다.
ngOnInit() {
this.routeSub = this.route.params.subscribe((params) => {
if ( params['id'] ) {
this.modalRef = this.resourcePopupService
.open(ResourceBlockChainInfoDialogComponent as Component, params['id']);
} else {
this.modalRef = this.resourcePopupService
.open(ResourceBlockChainInfoDialogComponent as Component);
}
});
}
반응형
'DEV > ANGULAR' 카테고리의 다른 글
angular httpclient 에러메세지가 null 일때 해결법 response error null (0) | 2017.08.15 |
---|---|
파이프에 파라미터로 객체 넘길때 에러 Parser Error: Missing expected } at the end of the expression (0) | 2017.08.10 |