Question: I want to show alert dialog in my android application if Network or GPS is disable, How it possible .please help me i am new for android

Answer: 
Try this:

```
import { DomSanitizer } from '@angular/platform-browser';
constructor(private sanitizer: DomSanitizer) { }

//where you want to use the unsafe html
const sanitizedHtml = this.sanitizer.bypassSecurityTrustResourceUrl(html);

```
What you can do, but goes against the Angular principle, is to append the html markup to the innerhtml of your component or the DOM using `ElementRef` from 
 `@angular/core`.

Sample appcomponent:

```
import { Component, ElementRef } from '@angular/core';

@Component({
  selector: 'my-app',
  template: ``,
})
export class AppComponent  {
  private htmlTemplate = `
    <div>Loading template</div>
    <script type="text/javascript">
      console.log('loaded');
    </script>
  `;
  constructor(private elementRef: ElementRef) { }

  ngAfterViewInit() {
    let elem: Element = this.elementRef.nativeElement;

    elem.innerHTML = this.htmlTemplate;
  }
}

```