cast (1) 썸네일형 리스트형 [angular] retrieve the data as number this code looks like no problem. but actually it could be error.this.route.params.subscribe( (params:Params) => { this.server = this.serversService.getServer(params['id']); } );let's look at this method. >> getServer(id:number)the parameter of getserver is for 'number' but the data from route.params is always string. so it makes the error.we can fix this with just one typing of '+''+' cast the v.. 이전 1 다음