Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
registerElements.forEach(element => {
// let injector = appRef.injector;
// let page: Page = injector.get(Page);
console.log("Add element: " + element.name);
registerElement(element.name, element.resolver)
});
import {Component, ViewChild} from '@angular/core';
import { registerElement } from 'nativescript-angular/element-registry';
import { MapView, Marker, Position } from 'nativescript-google-maps-sdk';
// Important - must register MapView plugin in order to use in Angular templates
registerElement('MapView', () => MapView);
@Component({
moduleId: module.id,
selector: 'map',
templateUrl: 'map.html',
styleUrls: ['map.css'],
})
export class MapComponent {
latitude = -33.86;
longitude = 151.20;
zoom = 8;
minZoom = 0;
maxZoom = 22;
bearing = 0;
tilt = 0;
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
import { NativeScriptModule } from 'nativescript-angular/nativescript.module';
import { AppRoutingModule } from './app.routing';
import { AppComponent } from './app.component';
import { HomeComponent } from './home/home.component';
import { registerElement } from 'nativescript-angular/element-registry';
import { PaintPad } from 'nativescript-paint';
registerElement('PaintPad', () => require('nativescript-paint').PaintPad);
@NgModule({
bootstrap: [AppComponent],
imports: [NativeScriptModule, AppRoutingModule],
declarations: [AppComponent, HomeComponent],
providers: [PaintPad],
schemas: [NO_ERRORS_SCHEMA],
})
/*
Pass your application module to the bootstrapModule function located in main.ts to start your app
*/
export class AppModule {}
export function initializeOnAngular() {
if (false === isInitialized) {
var _elementRegistry = require("nativescript-angular/element-registry");
_elementRegistry.registerElement("NSImage", function () {
return require("nativescript-image-cache").NSImage;
});
initialize();
isInitialized = true;
}
}
import { NgModule } from "@angular/core";
import { registerElement } from "nativescript-angular/element-registry";
import { DatePickerField } from "../ui/date-picker-field";
import { TimePickerField } from "../ui/time-picker-field";
import { DateTimePickerFields } from "../ui/date-time-picker-fields";
import { DIRECTIVES } from "./nativescript-datetimepicker.directives";
@NgModule({
declarations: [DIRECTIVES],
exports: [DIRECTIVES],
})
export class NativeScriptDateTimePickerModule { }
registerElement("DatePickerField", () => DatePickerField);
registerElement("TimePickerField", () => TimePickerField);
registerElement("DateTimePickerFields", () => DateTimePickerFields);
import { NgModule } from '@angular/core';
import { registerElement } from 'nativescript-angular/element-registry';
import { NSWEBRTCVIEW_DIRECTIVES } from './nativescript-webrtc-directives';
import { WebRTCView } from '../';
registerElement('WebRTCView', () => WebRTCView);
@NgModule({
declarations: [NSWEBRTCVIEW_DIRECTIVES],
exports: [NSWEBRTCVIEW_DIRECTIVES]
})
export class WebRTCModule {
}
exports.initializeOnAngular = function() {
if (false === isInitialized) {
var _elementRegistry = require("nativescript-angular/element-registry");
_elementRegistry.registerElement("WebImage", function() {
return require("nativescript-web-image-cache").WebImage;
});
initialize();
isInitialized = true;
}
};
import { registerElement } from 'nativescript-angular/element-registry';
import { DIRECTIVES, bottomAppBarMeta } from './directives';
@NgModule({
declarations: [
DIRECTIVES
],
exports: [
DIRECTIVES
],
})
export class NativeScriptMDCBottomAppBarModule { }
registerElement('MDCBottomAppBar', () => require('../bottomAppBar').BottomAppBar, bottomAppBarMeta);
registerElement('MDCActionItem', () => require('../bottomAppBar').ActionItem);
registerElement('MDCNavigationButton', () => require('../bottomAppBar').NavigationButton);
registerElement('MDCMainActionButton', () => require('../bottomAppBar').MainActionButton);
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
import { registerElement } from "nativescript-angular/element-registry";
registerElement("MPLineChart", () => require("../chart").MPLineChart);
registerElement("MPBarChart", () => require("../chart").MPBarChart);
@NgModule({
schemas: [NO_ERRORS_SCHEMA],
})
export class NativeScriptMPLineChartModule {
}
import { NgModule } from '@angular/core';
import { registerElement } from 'nativescript-angular/element-registry';
registerElement('BubbleNavigation', () => require('../').BubbleNavigation);
import { BubbleNavigationDirective } from './bubble-navigation.directive';
@NgModule({
declarations: [BubbleNavigationDirective],
exports: [BubbleNavigationDirective],
})
export class BubbleNavigationModule { }