import * as dialogs from 'ui/dialogs' ; import { device } from 'platform' ; import { IWindow } from '../../../app/modules/core/interfaces/iwindow' ; export class WindowNative implements IWindow { public get navigator ( ) : any { return { language : device . language , userAgent : 'nativescript' } ; } public get location ( ) : any { return { host : 'nativescript' } ; } public alert ( msg ) { return dialogs . alert ( msg ) ; } public confirm ( msg ) { return dialogs . confirm ( msg ) ; } }