nativescript

NativeScript handling back button event

◇◆丶佛笑我妖孽 提交于 2019-11-28 01:18:01
问题 I am trying to handle the hardware back button in a NativeScript app. I am using NativeScript version 2.3.0 with Angular. Here is what I have in main.ts file // this import should be first in order to load some required settings (like globals and reflect-metadata) import { platformNativeScriptDynamic, NativeScriptModule } from "nativescript-angular/platform"; import { NgModule,Component,enableProdMode } from "@angular/core"; import { AppComponent } from "./app.component"; import {

Creating a collapsible list with NativeScript

僤鯓⒐⒋嵵緔 提交于 2019-11-28 00:33:16
I am trying to create a FAQs type of screen in my app however am not finding a way to show questions and collapse the answers when someone tap in the item. I already tried using RadDataForm Groups and was able to do the collapsing but I was not able to resize the screen and elements so now am trying with Accordion. Still I am not able to collapse or even show the questions. I saw someone here saying they were able to make the list work without Accordion just by using collapse and visible attributes but they did not share how they did it. When I click in the names on the list nothing happens. I

Assertion failure and NSInternalInconsistencyException in NativeScript

假如想象 提交于 2019-11-27 09:53:10
Can anyone help me on this? I am trying to run my NativeScript + Angular app in my iPhone. Terminal Creation Created tns create mysample --ng app, added iOS platform, successfully built with warnings and run time error arising when I tried to run in Xcode. Playground Creation Downloaded NativeScript + Angular app from NativeScriptPlayground , added iOS platform, successfully built with warnings and run time error arising when I tried to run in Xcode. Issue: In both cases, app is successfully installed in my device but when launch screen is launched, then immediately app is getting crashed.

How can I access Native api in NativeScript when I use Typescript

被刻印的时光 ゝ 提交于 2019-11-27 08:53:16
When I create two new apps with tns, one is the regular js version and one is with typescript. I get a strange error in the typescript version when I try to access a native library. When I create a loaded function with a console.log(pow(x,y)), it works fine with the js version but the typescript version crashes with this error. error TS2304: Cannot find name 'pow'. Why? TS: import { EventData } from "data/observable"; import { Page } from "ui/page"; import { HelloWorldModel } from "./main-view-model"; // Event handler for Page "navigatingTo" event attached in main-page.xml export function

Nativescript: HTTP failure response for unknown URL

会有一股神秘感。 提交于 2019-11-27 06:35:12
问题 I have a situation, I have pulled the latest changes from my branch and trying to run the application using tns run android command. The app is launched successfully but the API call is restricted throwing an error as soon as the app starts. I have also gone through this answer but that's not the problem it seems. Because for other team members it is working fine. :/ err { JS: "headers": { JS: "normalizedNames": {}, JS: "lazyUpdate": null, JS: "headers": {} JS: }, JS: "status": 0, JS:

Nativescript project running with Visual Studio Emulator

主宰稳场 提交于 2019-11-26 23:22:42
问题 I have a Nativescript application that I'm developing using VS Code and have no issues when I try to run it using the Nativescript launch configurations from the Nativescript extension, when I'm using a real device connected with USB or when I use one of the android-sdk emulators. Now I need to run Hyper-V on the machine too and those emulators cannot run when hypervisor is on. So I downloaded and installed Visual Studio Android Emulator which runs fine when I launch it manually. Problem is

Creating a collapsible list with NativeScript

本小妞迷上赌 提交于 2019-11-26 21:42:12
问题 I am trying to create a FAQs type of screen in my app however am not finding a way to show questions and collapse the answers when someone tap in the item. I already tried using RadDataForm Groups and was able to do the collapsing but I was not able to resize the screen and elements so now am trying with Accordion. Still I am not able to collapse or even show the questions. I saw someone here saying they were able to make the list work without Accordion just by using collapse and visible

Assertion failure and NSInternalInconsistencyException in NativeScript

两盒软妹~` 提交于 2019-11-26 14:55:07
问题 Can anyone help me on this? I am trying to run my NativeScript + Angular app in my iPhone. Terminal Creation Created tns create mysample --ng app, added iOS platform, successfully built with warnings and run time error arising when I tried to run in Xcode. Playground Creation Downloaded NativeScript + Angular app from NativeScriptPlayground , added iOS platform, successfully built with warnings and run time error arising when I tried to run in Xcode. Issue: In both cases, app is successfully