This question already has answers here:
How do you deploy Angular apps?
(19 answers)
Closed 6 years ago.
Actually I add these js files to start my Angular 2 app:-
But my page is loading around 400 Http calls, which is making app a bit slower.
out of these 400 calls 200 calls are initiating from system.js, please see in this pic
Is there a way to make it faster ??
Make sure you are using the minimized version of the file and use a CDN for delivery.
Related
This question already has answers here:
How do I hide javascript code in a webpage?
(12 answers)
Closed 12 months ago.
Is there a way I can stop people from seeing the Javascript Source code that includes the Server API key and server information?
No, there is not.
You can obfuscate and minify your code, but that doesn't help since your users can look at their browser's Network Inspector instead.
This question already has answers here:
How can I use JavaScript in Java? [closed]
(4 answers)
Closed 5 years ago.
I am building an Android app that communicates with a third-party API. On POST request from my app, some user information (sensitive) must be tokenized -- using functions from a Javascript library provided by the API developers.
My question is, is there any way to use this Javascript library in-app? The only solution I can think of is to set up my own remote server to handle the JS. This seems like a lot of hassle to handle one simple use-case. Is there any way to do this without setting up an outside server?
Thanks.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
mWebView.evaluateJavascript("onCheckFailure();",null);
} else {
mWebView.loadUrl("javascript:onCheckFailure();");
}
This question already has answers here:
How to execute shell command in Javascript
(16 answers)
Closed 5 years ago.
I currently have a project site ( interact.rdarellano.com ) which uses PHP forms to run Bash scripts on my webserver. I'm not happy with this PHP method because it reloads the site every time that the button is clicked.
I've read that Javascript may be able to handle this task in the background. I've never experimented with Javascript so I'm hoping to find somebody that can help me achieve this or guide me on how to set this up.
Read about JSON and AJAX. Start with Jquery which has methods to deal with this.
This question already has answers here:
HTTP GET request in JavaScript?
(31 answers)
Closed 6 years ago.
I want to send an async HTTP request from the HTML, parse a response, and update an HTML page respectively. Is there a way to do it without using AJAX or any other third-party library?
I'd like to find the most basic way to do this.
Since libraries can do it, it should be possible without them too.
Worth saying, that I'm a mobile developer who checks web development for a couple of days.
UPDATE 1
I didn't have to call AJAX a "third-party library". My bad.
UPDATE 2
Thanks everybody who responded. What I've learned: the only way to do what I wanted is AJAX, in particular, XMLHttpRequest.
There is no way without JS. The most basic way is to either use the new fetch() API, or good old XMLHttpRequest() link
This question already has answers here:
How to handle localization in JavaScript files?
(3 answers)
Closed 9 years ago.
I need to internationalise the javascript messages in the frontend, I'm using play framework 2.2.1, for backend messages I followed this: http://www.playframework.com/documentation/2.0.x/ScalaI18N
But I could not find anything for frontend, any ideas? Thanks!
Play has no native support for JS internationalization, anyway you can easily do it yourself using common JS files containing objects with labels + small method for finding proper translation.
Check this answer - you'll find there full implementation for Play 2.x