How to use the @nativescript/angular/element-registry.isKnownView function in @nativescript/angular

To help you get started, we’ve selected a few @nativescript/angular examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Notalib / nativescript-webview-ext / src / angular / index.ts View on Github external
import { NgModule } from "@angular/core";
import { isKnownView, registerElement } from "@nativescript/angular/element-registry";

const webviewElementName = "WebViewExt";

if (!isKnownView(webviewElementName)) {
    registerElement(webviewElementName, () => require("../webview-ext").WebViewExt);
}

@NgModule()
export class WebViewExtModule {}