nativescript

Nativescript-Vue Creating Dinamyc Elements

非 Y 不嫁゛ 提交于 2020-01-16 17:10:10
问题 I was wondering how could i create new elements dynamically like buttons, labels, or textfield which are inside a layout. I have the following code: <AbsoluteLayout ref="abs"> <Label :text="L('UserClockIn.info.5')" top="10" left="10" /> <Label class="stk-table-row-data" :text="clockInTimes[0]" top="10" left="100" /> <Label class="stk-table-row-data" :text="clockInTimes[1]" top="10" left="165" /> <Label class="stk-table-row-data" :text="clockInTimes[2]" top="10" left="230" /> </AbsoluteLayout>

Nativescript-Vue Creating Dinamyc Elements

旧城冷巷雨未停 提交于 2020-01-16 17:09:48
问题 I was wondering how could i create new elements dynamically like buttons, labels, or textfield which are inside a layout. I have the following code: <AbsoluteLayout ref="abs"> <Label :text="L('UserClockIn.info.5')" top="10" left="10" /> <Label class="stk-table-row-data" :text="clockInTimes[0]" top="10" left="100" /> <Label class="stk-table-row-data" :text="clockInTimes[1]" top="10" left="165" /> <Label class="stk-table-row-data" :text="clockInTimes[2]" top="10" left="230" /> </AbsoluteLayout>

Does RadListView still exist (Nativescript pro-ui)

五迷三道 提交于 2020-01-16 16:20:33
问题 Edit: I have posted the higher level version of getting RadListView to work with the grouping function here. The question here addresses just getting RadListView to work in its basic form. I have been away from Nativescript pro ui for a few months, and now am trying to put together a multilevel list (with categories, items in each category; and user able to hide and show categories with tap). From the discussion here I see that *ngFor is not the stable way to do a multilevel list (though it

Nativescript/Angular extending HttpClient

为君一笑 提交于 2020-01-16 09:41:50
问题 I'm since I'm adding nativescript-https to my Nativescript/Angular app I'm making a wrapper. So, since Nativescript's NativeScriptHttpClientModule uses Angular's HttpClientModule I'm extending HttpClient, and I created the http-client.ts file: import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable, from } from 'rxjs'; import * as Https from 'nativescript-https' export interface IRequestOptions { headers?:

Nativescript/Angular extending HttpClient

天大地大妈咪最大 提交于 2020-01-16 09:41:32
问题 I'm since I'm adding nativescript-https to my Nativescript/Angular app I'm making a wrapper. So, since Nativescript's NativeScriptHttpClientModule uses Angular's HttpClientModule I'm extending HttpClient, and I created the http-client.ts file: import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable, from } from 'rxjs'; import * as Https from 'nativescript-https' export interface IRequestOptions { headers?:

NativeScript: Augment tns-platform-declarations

ε祈祈猫儿з 提交于 2020-01-15 05:38:24
问题 In my NativeScript project i want to include RecyclerView from Android Support Library. I included the dependency in app/App_Resources/Android/app.gradle : // Uncomment to add recyclerview-v7 dependency dependencies { compile 'com.android.support:recyclerview-v7:+' } From git issue#2295 and other related issues, i read that tns-platform-declarations can be included to offer definition files for native android/ios libraries. So i installed them and followed tns platform declarations

Model class from another path throws error calling module in NativeScript

…衆ロ難τιáo~ 提交于 2020-01-14 05:36:08
问题 I had a web application which worked perfectly and then migrated it with NativeScript into a mobile application. I have a model file in src/app/model , where I have inside some class model exported like this: export class User { username: string; password: string; } I am trying to import that class model to a service class. My service class path is src/app/auto-generated/service . When I am importing it, the app does not work. But when I am creating the same class model in the src/app/auto

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

▼魔方 西西 提交于 2020-01-13 19:24:51
问题 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() {

Nativescript (Angular 2) - Hide some lines of app.component.html in specific components

时光总嘲笑我的痴心妄想 提交于 2020-01-11 12:57:29
问题 I want to hide some lines of the app.component.html for specific components. I have a bottom-navigation-bar which some components need. there are some components where the navbar should not show up. Is there any way that I could hide these lines on specific components in my typescript file? app.component.html <Gridlayout rows="*, auto"> <page-router-outlet row="0"></page-router-outlet> <!-- Hide this --> <BottomNavigation row="1"> // Code </BottomNavigation> </GridLayout> 回答1: You can create

Get a local json file on NativeScript

跟風遠走 提交于 2020-01-11 08:39:08
问题 How to get a local big json data? I have tried this, but I had no success: var sa = require("./shared/resources/sa.json"); var array = new observableArrayModule.ObservableArray(sa); 回答1: Use the file-system module to read the file and then parse it with JSON.parse() : var fs = require('file-system'); var documents = fs.knownFolders.currentApp(); var jsonFile = documents.getFile('shared/resources/sa.json'); var array; var jsonData; jsonFile.readText() .then(function (content) { try { jsonData