NativeScript Angular


The HtmlView represents a view with HTML content. Use this component instead of a WebView when you want to show static HTML content.


Creating Htmlview

Create HtmlView via HTML

<HtmlView [html]="htmlString" ></HtmlView>

Create HtmlView via TypeScript

import { Component } from "@angular/core";

    templateUrl: "./creating-htmlview.component.html"

export class CreatingHtmlViewExampleComponent {
    public htmlString: string;

    constructor() {
        this.htmlString = '<span><h1>HtmlView demo in <font color="blue">NativeScript</font> App</h1></span>';

Improve this document

Demo Source

API Reference for the HtmlView Class

Native Component

Android iOS
android.widget.TextView UILabel