nativescript

NativeScript Sidekick - UnhandledPromiseRejectionWarning: primordials is not defined

时间秒杀一切 提交于 2019-12-06 14:01:55
When starting up NativeScript Sidekick, I am presented an exception from the Windows stating the following (this error message also shows up in the output Errors in Sidekick): UnhandledPromiseRejectionWarning: ReferenceError: primordials is not defined (for easier reading the full stack trace of the error can be found at the bottom) I have literally not done anything except install NativeScript Sidekick and open the application. How do I resolve this issue? (CLI) (node:6632) UnhandledPromiseRejectionWarning: ReferenceError: primordials is not defined at fs.js:27:35 at req_ (userFolder\AppData

Nativescript with Angular error when using HttpClient

六月ゝ 毕业季﹏ 提交于 2019-12-06 11:23:08
I am trying to use the Angular's HttpClient in my Nativescript application but when I import it in my component I get Error: Trying to link invalid 'this' to a Java object Update I also tried adding this in the Groceries example without changing anything else and it doesn't work { "description": "ArkCash", "license": "SEE LICENSE IN <your-license-filename>", "readme": "NativeScript Application", "repository": "<fill-your-repository-here>", "nativescript": { "id": "arkcash.chbtechnologies.ch.arkcash_mobile", "tns-android": { "version": "3.2.0" } }, "dependencies": { "@angular/animations": "~4.4

how to get context of a tapped list item to show details in another page in Nativescript

佐手、 提交于 2019-12-06 10:42:01
i am trying to create a listview to show data from hardcoded array list and its working good , but i need to make user able to click on any item to show the details of this item in another page , how can i do that ? i tried to create another array for details and make bindingContext and its working good but no data show when converting to details page as you can see here thats my code : main-view-model.js: var Observable = require("data/observable").Observable; function RegisterViewModel() { var viewModel = new Observable(); viewModel.shows = [ {name:"Reg1"}, {name:"Reg2"}, {name:"Reg3"},

Angular Workspace with two Angular + Nativescript Code sharing Project + Library

為{幸葍}努か 提交于 2019-12-06 07:56:21
I have a structure like this: AngularWorkspace/ |--app/ | | -- |--dist/ | |-- |--node_modules/ | |-- |--projects/ | |--library/ | |--AngularNativescriptAppOne/ | | |--App_Resources | | |--src | | | |--app/ | | | |--assets/ | | | |--environments/ | | | |--environments/locale | | | |--environments/package.json | | | |--environments/tsconfig.app.json | | | |--environments/main.ts | | | |--environments/main.ns.ts | |--AngularNativescriptAppTwo/ | | |--App_Resources/ | | |--src/ | | | |--app/ | | | |--assets/ | | | |--environments/ | | | |--environments/locale | | | |--environments/package.json | |

Hide Tab Buttons in NativeScript TabView

扶醉桌前 提交于 2019-12-06 07:32:43
I'm using Nativescript with Typescript/Angular and, for both iOS and Android, I'd like to hide the navigation tab buttons completely without losing the swipe functionality between the tabs. Said another way: I want the tab content, but not the buttons. I'm open to other suggestions to gain the same functionality without the tab navigation menu. The closest answer I could find was this: NativeScript How to hide tab buttons from TabView However, this answer didn't work. It caused the entire page to go white and none of the tab items appeared. It seemed as though the swipe functionality ceases to

Nativescript - How to POST Image with http.request

心不动则不痛 提交于 2019-12-06 06:53:17
Help, I need call the http.request for send Image captured in camera api in my NativeScript App. I capture the photo in camera api for nativescript and need send to api in upload process. Follow the code about this process: var frameModule = require("ui/frame"); var viewModule = require("ui/core/view"); var Observable = require("data/observable").Observable; var config = require("../../shared/config"); var cameraModule = require("camera"); var imageModule = require("ui/image"); var http = require("http"); exports.loaded = function(args) { var page = args.object; viewModel = new Observable({

Debug Nativescript on Visual Studio Code not working

我只是一个虾纸丫 提交于 2019-12-06 06:14:50
I am able to use the cmd to run my nativescript project ( tns run android). I open the project in VSCode, and add the Configuration to debug it. I hit debug and it look like the debug try to run or something. (Look at the green bar under debug. However, nothing seem to run. I look at the debug console, nothing is print out. Please take a look at screenshot. Spent couple days on this issue and couldnt resolve it at all. VSCode Debug Issue Thanks Nick Iliev, The problem actually is from VSCode itself. Somehow the version 1.20 doesn't work for debug. I end up removed and reinstalled version 1.19

Nativescript 2.2 exception

蓝咒 提交于 2019-12-06 05:54:18
Getting the following exception with 2.2. Was working with previous version. Did "tns info" and all is updated to 2.2 JS: Error: Uncaught (in promise): EXCEPTION: Error in pages/listview/listview.html:12:2 JS: ORIGINAL EXCEPTION: TypeError: _this.cssClasses(...).set is not a function JS: ORIGINAL STACKTRACE: JS: TypeError: _this.cssClasses(...).set is not a function JS: at /data/data/org.nativescript.test1/files/app/tns_modules/nativescript-angular/view-util.js:254:78 JS: at Array.forEach (native) JS: at ViewUtil.setClasses (/data/data/org.nativescript.test1/files/app/tns_modules/nativescript

Nativescript webview and android back button

走远了吗. 提交于 2019-12-06 05:29:02
问题 I have a made a page in nativescript that only containes a webview. Here is my code: <Page xmlns="http://www.nativescript.org/tns.xsd" actionBarHidden="true"> <WebView src="http://example.com/" /> </Page> And here is the JS: import * as webViewModule from "tns-core-modules/ui/web-view"; let webView = new webViewModule.WebView(); webView.on(webViewModule.WebView.loadFinishedEvent, function (args: webViewModule.LoadEventData) { let message; if (!args.error) { message = "WebView finished loading

Nativescript : Android new navigation bar

橙三吉。 提交于 2019-12-05 23:46:08
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 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"; import dependencyObservableModule = require("ui/core/dependency-observable"); import {EventData} from "data