22 Haziran 2021 Salı

Text Ellipsis

text-overflow:ellipsis; only works when the following are true:

The element's width must be constrained in px (pixels). Width in % (percentage) won't work.
The element must have overflow:hidden and white-space:nowrap set.

text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;

9 Haziran 2021 Çarşamba

Angular HttpClient error handling working code

 public load(urlstring = '') {

        if (url) {
            this.url = url;
        }

        this.httpClient.get<T>(this.url)
        .pipe(catchError((erranycaughtObservable<T>): ObservableInput<T=> {
            return throwError(err);
        }))
        .subscribe((data=> {
            this.data = data
            this.onLoad.next(this.data);            
        });
    }