nativescript

Nativescript FormattedString - tap event on a Span

那年仲夏 提交于 2019-12-12 12:24:42
问题 I have the following markup: <StackLayout paddingLeft="15" paddingRight="15" dock="top" > <Label textWrap="true"> <Label.formattedText> <FormattedString> <FormattedString.spans> <Span text="By checking 'yes' I understand that this is a legally valid and binding written agreement, and I indicate that I have read, understand, and agree to the terms of my " /> <Span text="Agreement. " foregroundColor="#3aba90" tap="viewAgreemnent" /> <Span text="Also, by checking 'yes', I certify that I have

Nativescript / TypeScript error - error TS5053: Option 'sourceMap' cannot be specified with option 'inlineSourceMap'

冷暖自知 提交于 2019-12-12 11:18:19
问题 { "compilerOptions": { "module": "commonjs", "target": "es5", "sourceMap": true, "experimentalDecorators": true, "emitDecoratorMetadata": true, "noEmitHelpers": true, "noEmitOnError": true, "watch": true }, "exclude": [ "node_modules", "platforms" ], "compileOnSave": true } Above is my tsconfig.json . I'm getting an error that I'm not understanding why i'm getting. any thoughts? Here's the errors in debug console in vscode i'm getting [NativeScriptCli] execute: tns --version [NSDebugAdapter]

Error: 'tns preview' - Plugin not include

梦想与她 提交于 2019-12-12 10:28:10
问题 I have a next error: Error_'tns previe' and this is my package.json: pakage.json How can I resolve this error? 回答1: As the error reads, you can't use any plugin with preview app except the predefined set of plugins those were packed with the Preview app, like nativescript ui plugins, background-http, camera etc., The Preview app comes with a predefined set of NativeScript plugins. If your app utilizes a plugin that is not present in the Preview app, you will see a warning message and your app

Nativescript : Android new navigation bar

假如想象 提交于 2019-12-12 09:55:34
问题 According to Google's new Material Design guidelines, the navigation bar is supposed to be at the bottom. How can I implement it (if there is a way) ? For the moment, I'm using a Tabview which, by default on Android, is put at the top of the page. Thank you 回答1: For this case, i created a custom Nativescript component. It's really basic but i hope it will help you. app/components/bottom-navigation.ts import gridLayoutModule = require("ui/layouts/grid-layout"); import {Label} from "ui/label";

Filter ListView using angular2 in NativeScript

不羁的心 提交于 2019-12-12 05:38:42
问题 I am new to nativescript and angular2. I want to filter listview using textfield input entered by user. in angular version 1, we used to do it like <input type="text" ng-model="userinput"> <div ng-repeat="x in items | filter : userinput"> </div> how can i do this using angular2 in nativescript? my listview is: <ListView [items]="myItems" class="list-group"> <template let-item="item"> <StackLayout> <Label [text]='item.Department' class="list-group-item"></Label> </StackLayout> </template> <

Import ppplus-library for rendering payment wall via given Link in TypeScript

◇◆丶佛笑我妖孽 提交于 2019-12-12 04:47:52
问题 Is it possible to import a given JS-Library (in my case it would be https://www.paypalobjects.com/webstatic/ppplus/ppplus.min.js from this .pdf file chapter 8.1 - "Integrating the payment wall")? The text tells me the following: 1) Include JS library: <script src="https://www.paypalobjects.com/webstatic/ppplus/ppplus.min.js" type="text/javascript"></script> 2) Define a placeholder DIV: <div id="ppplus"> </div> 3) Render Payment wall: <script type="application/javascript"> var ppp = PAYPAL

NativeScript Sidekick won't run since CLI 3.2.1 update doesn't work

◇◆丶佛笑我妖孽 提交于 2019-12-12 04:43:39
问题 I opened NativeScript Sidekick on my Mac and it updated to the latest version 0.2.5. It shows a dialog stating I need to update NativeScript CLI to 3.2.1 and the only option is to quit. I went to Terminal and tried tns update but it won't update to 3.2.1 saying the platforms for 3.2.1 are not available. (I posted to the NativeScript forums and was told that is correct -- the platforms are at 3.2.0 while only the CLI is updated to 3.2.1.) I also tried tns update 3.2.1 which simply says 3.2.1

Nativescript with Angular 2 on Android, how to close my app?

落爺英雄遲暮 提交于 2019-12-12 04:31:06
问题 I would like a button. When you tap the button, the application closes, and go to home screen. Not needed to really close the app, just go to home screen. How can I achieve this? 回答1: On iOS you're not allowed by the operating system to programmatically close the app. I'm not sure it's a good practice on Android, but it has been asked and answered many times on StackOverflow. 来源: https://stackoverflow.com/questions/41307447/nativescript-with-angular-2-on-android-how-to-close-my-app

Angular/Nativescript: Listview doesn't show at all

拥有回忆 提交于 2019-12-12 04:25:37
问题 I am busy with a very basic Angular2/Nativescript app where i'm trying to replicate a table from a web app where I display stock transactions using Nativescript's GridLayout and ListView... i'm not sure there's a way to add all content in the ListView and not have the table headers repeat with in every item in the ListView so i've created two GridLayouts, one at the top and one contained in the ListView... When I click on the show stock transactions button the ListView doesn't show at all.

Nativescript Angular - No provider for Router! (RC4 - Router 3.0.0-beta.2)

怎甘沉沦 提交于 2019-12-12 03:49:37
问题 The following Nativescript Angular application- demonstrates navigation using <router-outlet></router-outlet> - but after to ANGULAR "2.0.0-rc.4" and ROUTER "3.0.0-beta.2", the application fails to load. ERROR thrown: No provider for Router! JS: EXCEPTION: Error in ./AppComponent class AppComponent_Host - inline template:0:0 JS: ORIGINAL EXCEPTION: No provider for Router! JS: ORIGINAL STACKTRACE: JS: Error: DI Exception JS: at NoProviderError.BaseException [as constructor] (/data/data/org