angular2-nativescript

Integrating nativescript-paytm plugin in nativescript-vue application

北城以北 提交于 2019-12-05 13:22:58
I'm having a nativescript-vue application where I want to integrate nativescript-paytm plugin, I created a method on click event: payNow() which contains all the necessary details of Paytm as described in Readme.md/documentation/demo app. import { Paytm, Order, TransactionCallback, IOSCallback } from "@nstudio/nativescript-paytm"; const paytm = new Paytm() methods: { payNow() { paytm.setIOSCallbacks({ didFinishedResponse: function(response) { console.log(response); }, didCancelTransaction: function() { console.log("User cancelled transaction"); }, errorMissingParameterError: function(error) {

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

时间秒杀一切 提交于 2019-12-04 22:27:47
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(' https://www.nativescript.org/setup/win '))" during installation it gets stuck saying c:\user\user-name.android\repositories.cfg cannot load file Try this: Error resolved by creating an empty repositories.cfg file. Reference 来源: https://stackoverflow.com/questions/47028626

How can I specify or get the resource id of a nativescript textfield

亡梦爱人 提交于 2019-12-04 01:53:53
We are using nativescript with angular for our mobile app. I want to use the Google Play pre-launch report feature, but our app requires a password to be entered. Google Play allows specifying a password but you need a resource name so the testing script can identify where to put the password. How can I specify or receive the resource name of a nativescript textfield, either in the view or by code behind or via any other means? The view in question: <StackLayout class="form"> <GridLayout columns="*,90" rows="50"> <TextField #inviteTx col="0" height="50" autocorrect="false" returnKeyType="next"

NativeScript: Disable all controls while ActivityIndicator is shown

余生长醉 提交于 2019-12-02 10:44:53
问题 Lets say there is a login page with username\password TextFields and login Button. When the button is pressed a request is set to a server and ActivityIndicator is shown. Currently I put StackLayout on top of all other controls not to give the user a possibility to click on them while processing the request. But in some cases TextField stays focused and the user can type there. I'm already using a component to wrap all TextFields to show validation errors: @Component({ selector: "field",

Sharing JSON data from server between 2 components

不问归期 提交于 2019-12-02 09:38:51
I posted this yesterday but I have changed so much of the code today I have basically re-written my question: I have a NativeScript with Angular app using the TabView template and a login form using a modal window over the tabs initially and this appears to be working OK - the login form has no tabs and when logged in I am taken to the TabView. Upon successful login I want to call methods within the tabbed components and update the respective templates with content specific to the logged in user. For example one of these is a list of user reports. I am trying to get a list of user reports from

Load Local HTML/JavaScript/CSS Inside NativeScript App

回眸只為那壹抹淺笑 提交于 2019-12-02 04:43:13
问题 With a NativeScript iOS and Android app using Angular, how do I load, inside of a WebView, a locally stored html file that has JS and CSS references? I am able to display the WebView but I get the error that the file is not found because I do not know where to point the src from my component. Currently I have the files inside src/assets and in there is the index.html Is there a more appropriate place to store these files within the app? Is there a better way to display this than a WebView?

NativeScript: Disable all controls while ActivityIndicator is shown

早过忘川 提交于 2019-12-02 04:23:49
Lets say there is a login page with username\password TextFields and login Button. When the button is pressed a request is set to a server and ActivityIndicator is shown. Currently I put StackLayout on top of all other controls not to give the user a possibility to click on them while processing the request. But in some cases TextField stays focused and the user can type there. I'm already using a component to wrap all TextFields to show validation errors: @Component({ selector: "field", template: "<grid-layout><ng-content></ng-content>...</grid-layout>" }) export class FieldComponent {

Load Local HTML/JavaScript/CSS Inside NativeScript App

送分小仙女□ 提交于 2019-12-02 00:41:25
With a NativeScript iOS and Android app using Angular, how do I load, inside of a WebView, a locally stored html file that has JS and CSS references? I am able to display the WebView but I get the error that the file is not found because I do not know where to point the src from my component. Currently I have the files inside src/assets and in there is the index.html Is there a more appropriate place to store these files within the app? Is there a better way to display this than a WebView? How do I reference this file as the source of a WebView? I will also be needing to know how to reference

Angular 2 do not refresh view after array push in ngOnInit promise

坚强是说给别人听的谎言 提交于 2019-12-01 15:14:10
I created a NativeScript app with angular 2, i have an array of objects that i expect to see in the frontend of the application. the behaviour is that if i push an object into the array directly inside the ngOnInit() it works, but if i create a promise in the ngOnInit() it doesn't work. here is the code: export class DashboardComponent { stories: Story[] = []; pushArray() { let story:Story = new Story(1,1,"ASD", "pushed"); this.stories.push(story); } ngOnInit() { this.pushArray(); //this is shown var promise = new Promise((resolve)=>{ resolve(42); console.log("promise hit"); }); promise.then(x

How to use nativescript's WebView in angular2?

若如初见. 提交于 2019-12-01 09:40:44
I'm trying to insert a web-view on my page and listen the 'loadFinishedEvent'... But for do this, i need to find the webview in my component (ts file), through nativescript way i need to wrap my xml (UI) with a tag: <Page xmlns="http://schemas.nativescript.org/tns.xsd But doing this i got this error: " TypeError: this.page.frame._getNavBarVisible is not a function ", and without the Page tag i've already tried with some ways but with unsuccessful... I do not found any sample of this too, can anyone help me? Dlucidone Your .ts file containing class implementation import { Component } from "