angular2-nativescript

Angular Nativescript can't navigate in lazy module

笑着哭i 提交于 2019-12-25 01:47:00
问题 Template I used : Nativescript-Tabs-Template When I try to navigate to sibling component (both are in one lazy module) with: showItem() { this.routerExtensions.navigate(["details/"]); } (also done this - not sure if this is ok ) : this.routerExtensions.navigate(["details", { outlets: { searchTab: ['details'] } }]); I get the error : Error: Cannot match any routes. URL Segment: 'details' *But when I navigate with nsRouterLink it works: * <Label text="this works" [nsRouterLink]="['/details']><

Create NativeScript Plugin using IOS Static Library issue

a 夏天 提交于 2019-12-24 22:32:16
问题 I have created .a static library (tested in Xcode for native ios project and Its working fine) Now I am following this https://github.com/NativeScript/nativescript-plugin-seed to create nativescript plugin using .a static framework. Plugin structure module.modulemap file is created by me and it's look like this module libstaticlibrary { umbrella header "staticlibrary.h" export * } staticlibrary.h #import <Foundation/Foundation.h> @interface staticlibrary : NSObject + (NSString *)sayHello;

How to access android's R object in NativeScript?

拥有回忆 提交于 2019-12-24 21:34:25
问题 I am trying to access android's R object in NativeScript with Angular but I haven't had any success. The instructions here say to do it like this: android.R.color.holo_purple But when I try to import the android variable from the application module or the tns-core-modules/platform module I get an error that the R property on the android object is undefined. How do I get access to R ? 回答1: you don't need to import android variable from application module. it is automatically available by

cannot get nativescript-plugin-firebase demo-push app to work

对着背影说爱祢 提交于 2019-12-24 20:53:45
问题 Can anyone help me install the nativescript-plugin-firebase Push-demo application. I could not manage to install and make it work. So please is there a guidance step by step for beginners? This is the demo link: https://github.com/EddyVerbruggen/nativescript-plugin-firebase/tree/master/demo-push @Eddy Verbruggen: Your help will be appraciated Regards 来源: https://stackoverflow.com/questions/52890502/cannot-get-nativescript-plugin-firebase-demo-push-app-to-work

Different release & debug config in a nativescript app

蓝咒 提交于 2019-12-24 19:14:25
问题 I've created 2 files: "config.debug.ts" & "config.release.ts". My understanding is that NativeScript's build script should copy the appropriate file to "config.ts" during the build. And then I should be able to do something like "import { config } from './config'" from my other *.ts files. That however does not happen and I'm getting a compilation error when doing "tns run". Now, I'm in doubt if I'm doing this properly at all.. What is the "true NS" way to have different configs for debug &

Nativescript Stacklayout does not layout properly?

六眼飞鱼酱① 提交于 2019-12-24 09:28:42
问题 I have this simple layout markup : <StackLayout orientation="horizontal" #myStack> <StackLayout width="300" backgroundColor="red"> </StackLayout> <StackLayout width="300" backgroundColor="green"> </StackLayout> </StackLayout> As you can see , both are same width of 300: Let's see this : Notice that green is also 300 but we only see a part of it since 300+300 > screen size . Ok so let's try to animate #myStack (!!) to the left , in order to see the left green : ngOnInit(): void { setTimeout(()

iOS Provision violated for watchdog scene-create using Pushkit

你说的曾经没有我的故事 提交于 2019-12-24 09:13:32
问题 Issue Provision violated for watchdog scene-create: <FBSProcessResourceProvision: 0x282c3bc00; allowance: <; FBSProcessResourceAllowance; type: scheduledTime; timeValue: 0.40s>; violated: YES> In my Nativescript-Angular app, older iOS devices like the iPhone6 fail to launch via pushkit because watchdog terminates it. I am not doing any network actions (which seems to be the main reason for watchdog from other posts). I created a dummy app which have the same app module, app component and all

multiple select angular nativescript

好久不见. 提交于 2019-12-24 07:25:10
问题 I need to build a multiple item select UI element for my nativescript angular app. There does not seem to be a nativescript UI component supporting multiple selection. Any examples of how I could implement this for my app? 回答1: Use Nativescript UI. List view and side drawer is free. http://docs.telerik.com/devtools/nativescript-ui/Controls/Angular/ListView/selection multiple selection - allows for selecting multiple items. RadListView keeps track of which items are selected and exposes them

No provider for Store! Error at injectionError

倾然丶 夕夏残阳落幕 提交于 2019-12-24 01:53:40
问题 app.component.html <page-router-outlet></page-router-outlet> app.component.ts import 'rxjs/add/operator/let'; import { Component, ViewEncapsulation } from '@angular/core'; import { EchoesState, getSidebarCollapsed$ } from './core/store'; import { Store } from '@ngrx/store'; @Component({ selector: "ns-app", templateUrl: "app.component.html", }) export class AppComponent { constructor(private store: Store<EchoesState>){} } app.module.ts import 'nativescript-localstorage'; import { NgModule, NO

How to convert existing NativeScript Angular project to Code Sharing project

╄→гoц情女王★ 提交于 2019-12-24 00:56:25
问题 All available tutorials talk about converting Angular Web Apps to codesharing Nativescript projects. I want to do the opposite. I almost finished coding the mobile app with Nativescript and now I wanna make the Web App with the code sharing in between both. 回答1: I did almost the same a couple of days ago, and while not exactly standard, my approach has been: create a new shared web/mobile project from scratch. move angular components from the mobile-only project to the shared project. rename