I have the following code
ngOnInit(): void {
this.route.params
.subscribe(
(param:Params) =>{
this.http.get(environment.creator_by_url_slug + param.creatorurlslug)
.subscribe((req: any)=>{
this.creatorobject = req;
});
}, error => {
console.log('this is the error');
console.log(error);
}
);
}
however when I get a 404 back from my server, the error handler is not called.
I am not getting console output
is there something wrong with my syntax?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…