angular2-nativescript

I have an issue with “history back” when navigate to same page

扶醉桌前 提交于 2019-12-08 07:36:28
When I navigate to the same component (with nativescript angular), I can intercept the params change but when i tap the Android Back button, it doesn't return back to previous page. constructor(private pageRoute: PageRoute) { super(); this.pageRoute.activatedRoute .switchMap(activatedRoute => activatedRoute.params) .forEach((params) => { this._groupId = params['id']; this.load(); // this method reload the list in the page. }); } I navigate in the same page "group/:id" with different url "home" -> "group/1" -> "group/2" -> "group/3". If I click Android Back Button in "group/3", I return to

Nativescript add tab into TabView dynamically - content disappears

和自甴很熟 提交于 2019-12-08 04:46:39
问题 I asked two days ago question about ListView but now I find out the core problem wasn't about listview but the problem was in TabView. On the start when It was created tabs everything looks fine but when I Tap on button which add another tab it doesn't work correctly. Tab is added (on the end) and selected index of tabs is 2 but content of previous tab (tab index 1) disappears. But when I go to last tab (index 3) and back to tab (index 1) content is there. Here is the code snippet where you

I have an issue with “history back” when navigate to same page

喜夏-厌秋 提交于 2019-12-08 04:26:41
问题 When I navigate to the same component (with nativescript angular), I can intercept the params change but when i tap the Android Back button, it doesn't return back to previous page. constructor(private pageRoute: PageRoute) { super(); this.pageRoute.activatedRoute .switchMap(activatedRoute => activatedRoute.params) .forEach((params) => { this._groupId = params['id']; this.load(); // this method reload the list in the page. }); } I navigate in the same page "group/:id" with different url "home

Prevent Angular NativeScript WebView from zooming with pinch zoom

别等时光非礼了梦想. 提交于 2019-12-08 03:45:08
问题 So I have a Nativescript App using Angular (NG 5.1.1 / Angular 7.x) I have a view with a webview. @ViewChild("myWebView") webViewRef: ElementRef; <WebView class="webview" #myWebView [src]="myURL"></WebView> Inside my webview.component.ts I have this. ngAfterViewInit(): void { const webview: WebView = this.webViewRef.nativeElement; webview.on(WebView.loadFinishedEvent, (args: LoadEventData) => { this.setIndicatorFalse(); if (webview.ios) { webview.ios.scrollView.delegate =

repositories.cfg could not be loaded in Windows 10 [closed]

。_饼干妹妹 提交于 2019-12-06 16:52:22
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . while installing native-script i got repositories.cfg could not be loaded error , please help me debugging it. It would help me if you can give the way to download the file externally. The code i used was..... @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString

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

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

angular- programmatically close alert when a new alert is triggered

冷暖自知 提交于 2019-12-06 06:38:06
问题 I have two kinds of alerts- secondary alerts and delayed alerts Secondary alert messgaes are shown at first and user has to hit OK button to close it. But there are delayed alerts also..which are triggered by a setTimeout() I'm trying to automatically close secondary alerts when this delayed alert is shown to user I tried to dismiss the secondary alerts like this this.secondaryAlertVar.dismiss(); But it's not working. Here's the code import { Component, OnInit } from "@angular/core"; import *

Nativescript scroll to bottom of ScrollView programmatically

冷暖自知 提交于 2019-12-05 22:14:46
In my Nativescript Angular application, I have a TextView within a ScrollView, defined as such: <ScrollView orientation="vertical" height="70%" width="100%" style="margin-bottom: 1%; background-color:white" (loaded)="onScrollerLoaded($event)"> <TextView id="terminal" [text]="terminalText" editable="false" style="color: whitesmoke; background-color: black; font-size: 8%; font-family: monospace" height="100%" (tap)="onTap($event)" (loaded)="onTerminalLoaded($event)"> </TextView> </ScrollView> The purpose of this element is to act as a terminal, and is rapidly printing incoming messages from a