How to use the nativescript-angular/element-registry.isView 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 Akylas / nativescript-material-components / src / appbar / angular / app-bar.ts View on Github external
insertChild: (parent: NgActionBar, child: NgView, next: any) => {
        if (isInvisibleNode(child)) {
            return;
        } else if (isNavigationButton(child)) {
            parent.navigationButton = child;
            child.parentNode = parent;
        } else if (isActionItem(child)) {
            addActionItem(parent, child, next);
            child.parentNode = parent;
        } else if (isView(child)) {
            parent.titleView = child;
        }
    },
    removeChild: (parent: NgActionBar, child: NgView) => {
github Akylas / nativescript-material-components / src / appbar / angular / app-bar.ts View on Github external
removeChild: (parent: NgActionBar, child: NgView) => {
        if (isInvisibleNode(child)) {
            return;
        } else if (isNavigationButton(child)) {
            if (parent.navigationButton === child) {
                parent.navigationButton = null;
            }

            child.parentNode = null;
        } else if (isActionItem(child)) {
            parent.actionItems.removeItem(child);
            child.parentNode = null;
        } else if (isView(child) && parent.titleView && parent.titleView === child) {
            parent.titleView = null;
        }
    }
};