nativescript

how to pass parameters to modal popup?

 ̄綄美尐妖づ 提交于 2020-01-05 04:01:06
问题 I am working on Nativescript application where i need to open view on click of list item. So i will have to pass id of that item to the modal that is about to open on click of list item. Here is my code as i tried and for opening modal popup : var modalPageModule = views.appointmentDetails; var context = { id: args.view.bookingId // i tried this way for passing parameter }; var fullscreen = true; page.showModal(modalPageModule, context, function closeCallback(parameters) { // Log the user in.

Nativescript getViewById not updating for count down

末鹿安然 提交于 2020-01-05 03:56:15
问题 So, i am using the timer that i asked about in this question as a count down: How to stop timer.setinterval with a tap event or leaving page in nativescript The counter works, all this while i have been using console.log to check if it works and yes it does but i want to make it appear in the xml for the user of that app to see. But the count does not update in the xml. Here's the code for the view: <Page xmlns="http://schemas.nativescript.org/tns.xsd" loaded="pageLoaded" navigatedTo=

Nativescript: how to programmatically disable / enable ScrollView scrolling?

百般思念 提交于 2020-01-04 07:53:11
问题 Is there a way to programatically disable/enable ScrollView scrolling in NativeScript? 回答1: Ok, I found how to do that. It's actually pretty easy on iOS: var scrollView = page.getViewById('YOUR_VIEW_ID') scrollView.ios.scrollEnabled = false // to disable scrollView.ios.scrollEnabled = true // to enable back Android: Also for my particular case, where I need to disable scrolling of the Scroll View, but drag and drop child views inside. On subview start dragging (panning) event we prevent touch

Nativescript: how to programmatically disable / enable ScrollView scrolling?

僤鯓⒐⒋嵵緔 提交于 2020-01-04 07:52:14
问题 Is there a way to programatically disable/enable ScrollView scrolling in NativeScript? 回答1: Ok, I found how to do that. It's actually pretty easy on iOS: var scrollView = page.getViewById('YOUR_VIEW_ID') scrollView.ios.scrollEnabled = false // to disable scrollView.ios.scrollEnabled = true // to enable back Android: Also for my particular case, where I need to disable scrolling of the Scroll View, but drag and drop child views inside. On subview start dragging (panning) event we prevent touch

NativeScript 3.4: WebView on iOS performance is Slow

≡放荡痞女 提交于 2020-01-03 04:54:15
问题 When I open an site in the WebView on NativeScript 3.4 & 4.0 the performance of the JavaScript is slow. Much much slower then normal WKWebView when build in Xcode. I have also tried the NativeScript playground (play.nativescript.org) and if you place out an WebView an run an some site with JavaScript it also have slow performance. Please help me 回答1: Se this: github. The issue might be related to the JavaScript which is set up to config the site's initial-scale.Just for the test I would

Debug Nativescript on Visual Studio Code not working

筅森魡賤 提交于 2020-01-02 19:26:10
问题 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 回答1: Thanks Nick Iliev, The problem actually is from

Nativescript 2.2 exception

≡放荡痞女 提交于 2020-01-02 14:38:26
问题 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

Identity Server 4/nativescript Hangs

吃可爱长大的小学妹 提交于 2020-01-02 01:57:47
问题 I have the following client: new Client { ClientId = "nativeapptest", ClientName = "Native App Test", Enabled = true, RequireClientSecret = false, AllowedGrantTypes = GrantTypes.Code, RedirectUris = { "com.mysite.nativeapp.12365789785256-buv2dwer7jjjjv5fckasdftn367psbrlb:/home" }, AllowedScopes = { IdentityServerConstants.StandardScopes.OpenId, IdentityServerConstants.StandardScopes.Profile, "MyScope" }, RequirePkce = false, AllowOfflineAccess = true, RequireConsent = false } I am using

How to access Google Play Services in NativeScript

依然范特西╮ 提交于 2020-01-01 03:41:28
问题 I am currently starting with NativeScript. I am trying to include certain Google Play Services to the android project. I put the relevant .aar files into the node_modules/ folder of my app project and built it. I can see they are successfully added to the project. :config phase: copyAarDependencies :config phase: addAarDependencies +adding dependency: C:\Users\pstueven\NativeScript\sample-Groceries\platforms\android\libs\aar\play-services-9.0.0.aar +adding dependency: C:\Users\pstueven

Accessability of native sensors in Nativescript

*爱你&永不变心* 提交于 2019-12-31 05:15:08
问题 I am the decision of choosing to implement an app in either Nativescript (Cross platform IOS/Android) or doing a 'real' native app with java/swift accordingly. Discarding the obvious 1 codebase vs 2 codebase discussion, I am uncertain of the limitations of Nativescript, if any. The main concern lies in the app's heavy demand for sensor data. I have to use a lot of the phone sensors in the app. Sensors like the android sensors. I get mostly what Nativescript does. But the question is, will