nativescript

How to load a local html file into a NativeScript webview

夙愿已清 提交于 2020-06-09 06:42:25
问题 I have modified the webpack.config.js to add a local file called index.html the code below : new CopyWebpackPlugin([ { from: { glob: "index.html" } }, { from: { glob: "fonts/**" } }, { from: { glob: "**/*.jpg" } }, { from: { glob: "**/*.png" } }, ], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }), new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"), This is how I configured my webview in the main-page.xml file the code below: <WebView row="1" loaded="onWebViewLoaded"

Chrome Devtools opens as a search rather then the dev tools themselves

时间秒杀一切 提交于 2020-06-01 06:21:53
问题 Trying to run a Nativescript debug session and every time I enter chrome-devtools://devtools/bundled/inspector.html?experiments=true&ws=localhost:41000 it opens a google search rather than the debug session. https://www.google.com/search?q=chrome-devtools%3A%2F%2Fdevtools%2Fbundled%2Finspector.html%3Fexperiments%3Dtrue%26ws%3Dlocalhost%3A41000&oq=chrome-devtools%3A%2F%2Fdevtools%2Fbundled%2Finspector.html%3Fexperiments%3Dtrue%26ws%3Dlocalhost%3A41000&aqs=chrome.0.69i59j69i60j69i61.1074j0j7

Nativescript webview get cookies on iOS

梦想与她 提交于 2020-05-31 05:04:27
问题 in my Nativescript Angular application, i authenticate to a node.js server using express-session and a nativescript webview. The server sends me back a cookie (connect.sid) containing the sessionid that i will use to access the node.js app. I cannot read the connect.sid cookie in response from the server on iOS. I am currently using NSHTTPCookieStorage.sharedHTTPCookieStorage.cookies, and this contains a connect.sid, but its value is not the right one. I managed to do that on Android using

Nativescript webview get cookies on iOS

不想你离开。 提交于 2020-05-31 05:03:05
问题 in my Nativescript Angular application, i authenticate to a node.js server using express-session and a nativescript webview. The server sends me back a cookie (connect.sid) containing the sessionid that i will use to access the node.js app. I cannot read the connect.sid cookie in response from the server on iOS. I am currently using NSHTTPCookieStorage.sharedHTTPCookieStorage.cookies, and this contains a connect.sid, but its value is not the right one. I managed to do that on Android using

How to hide keyboard after touch outside the textfield?

青春壹個敷衍的年華 提交于 2020-05-30 07:50:07
问题 I have a cross-platform app. I have a form that has more than one TextField. I want to hide the keyboard when the user touch outside of the textfield because it covers the button that sends the data. How can I do? In my .html file I have: <ScrollView> <GridLayout ios:style="margin-top:50"> <StackLayout class="form"> <!-- Some TextView --> </StackLayout> </GridLayout> </ScrollView> EDIT This is a Playground that show the error. 回答1: Add a tap listener to your layout and hide keyboard using iOS

How to hide keyboard after touch outside the textfield?

拈花ヽ惹草 提交于 2020-05-30 07:50:05
问题 I have a cross-platform app. I have a form that has more than one TextField. I want to hide the keyboard when the user touch outside of the textfield because it covers the button that sends the data. How can I do? In my .html file I have: <ScrollView> <GridLayout ios:style="margin-top:50"> <StackLayout class="form"> <!-- Some TextView --> </StackLayout> </GridLayout> </ScrollView> EDIT This is a Playground that show the error. 回答1: Add a tap listener to your layout and hide keyboard using iOS

How to call axios/api call in Nativescript application

五迷三道 提交于 2020-05-24 21:01:29
问题 I'm trying to build a small application on Nativescript-vue where I'm having backend laravel framework for api calls which needs to be called to get relevant data. For example if user wants to login he needs to validate its credentials through api oauth/token so I'm trying to call this through axios here is my code: My settings.js file contains. export const authHeader = { 'Accept': 'application/json', 'Content-Type': 'application/json' } this is being imported inside my axios calls: const

How to inciude a local html file in a webview in nativescript main-page.js?

£可爱£侵袭症+ 提交于 2020-05-17 07:03:09
问题 Is it possible to add a local html file in the nativescript webview ? If yes How can I do it using javascript ? When I add online page it works , I can add www.google.com in the webview it works .But I want to add a local page but I don't find a way to do this . 回答1: Yes, it's possible. You need to consider that all NativeScript apps are build by default with Webpack and the default webpack.config.js will take care of certain files (like the ones in a fonts folder or like all images with *

How to inciude a local html file in a webview in nativescript main-page.js?

廉价感情. 提交于 2020-05-17 07:03:05
问题 Is it possible to add a local html file in the nativescript webview ? If yes How can I do it using javascript ? When I add online page it works , I can add www.google.com in the webview it works .But I want to add a local page but I don't find a way to do this . 回答1: Yes, it's possible. You need to consider that all NativeScript apps are build by default with Webpack and the default webpack.config.js will take care of certain files (like the ones in a fonts folder or like all images with *

Disable button in Nativescript Raddataform

送分小仙女□ 提交于 2020-05-17 04:24:40
问题 I'm using commitMode="Immediate" and I'm trying to disable my save button when any input is invalid. What is the recommended approach to achieve this? I understand that I can just set a variable when using "manual" mode from my component, but I can't find any event that represents a change in validity of preferably the complete Raddataform (otherwise of a single property) when using Immediate validation. 回答1: You can do this by listening for validation events and then updating your model.