: Unsafe value used in a resource URL context

Pipe // Angular import { Pipe, PipeTransform } from ‘@angular/core’; import { DomSanitizer, SafeHtml, SafeStyle, SafeScript, SafeUrl, SafeResourceUrl } from ‘@angular/platform-browser’; /** * Sanitize HTML */ @Pipe({ name: ‘safe’ }) export class SafePipe implements PipeTransform { /** * Pipe Constructor * * @param _sanitizer: DomSanitezer */ // tslint:disable-next-line constructor(protected _sanitizer: DomSanitizer) { } /** * … Read more

Pre-bootstrap loading screen

I can suggest a simple CSS approach. First of all add .loading div into main HTML page, it should follow main app component element. For example: <my-app></my-app> <div class=”loading”> <h1>Loading…</h1> </div> Now you can target and style splash screen with my-app:empty + .loading CSS selector, and make it disappear as soon as the app gets … Read more

Angular 7 – nesting Observables

We can make use of pipeable RxJS operators for this scenario. First, we can use RxJS’s mergeMap to map over the observable values from route into an inner observable. If params and params[‘client_name’] are defined, we assign params[‘client_name’] to the client_name property, which is similar to your initial code. Then, we call the getClientDetails() method … Read more