Error http module of Angular 2 - angularjs

I'm developing an application for LG WebOS using Angular2, in Chrome and Firefox works fine but in TV embedded browser not works. This problem reproducing only when I using HTTP module
enter image description here
any solution?, Thanks.
Edited:
LG WebOS not support cookies, my solution was disable cookies from HTTP module of Angular2.

According to the image that you provided the cookie in the browser cannot be read. The issue might be that cookies are disabled in the embedded browser, or you are trying to access a module like localStorage that might not be available in the embedded browser.
This would explain why the calls do not work in all browsers.

Related

HTTP images over HTTPS using angularjs

whenever I visit my angularjs based website that loads images (http images on a https server) I get warnings in the console saying that mixed content has been blocked. And those images do not show up
It is not my browser because it happens on other browsers too and on other systems, it is not the server, because another website that does not use angularjs works fine. So I think it is related to angularjs.
I already did this:
$sceDelegateProvider.resourceUrlWhitelist([
'self',
'http://images.RESOURCE.net/*'
]);
but it does not do anything. Moreover I tried loading them over a protocol-less url so //images.RESOURCE.net
This causes them to be loaded over https but then the server identify of the image server could not be validated and it also does not work.
Is there anyone who can determine the actual problem, is it angularjs and can angularjs fix it? It is almost impossible to remove angularjs from the project at the current state.
Thanks
-xCoder
This is not a limitation of Angular. Modern browsers block the loading of mixed (http) content over a secure (https) connection. This can be addressed by adjusting settings in your browser of choice.
Enabling Mixed Content by Browser:
IE: http://wiki.sln.suny.edu/display/SLNKB/Enabling+mixed+content+in+Internet+Explorer
Firefox: http://wiki.sln.suny.edu/display/SLNKB/Enabling+mixed+content+in+Mozilla+Firefox
Chrome: http://wiki.sln.suny.edu/display/SLNKB/Enabling+mixed+content+in+Google+Chrome

Angular app doesn't work when built with Phonegap

Background:
I've built a Angular Application that works fine on browsers.
On the frontend side I have HTML/CSS/Angular/Bootstrap, backend side is Web API. So it is completely separated.
I took my front code zipped it, used Phonegap to build android app. When I run it I can see the first screen of my web site. I've confirmed that the angular code there works, cause I can see it filtered navigation based on the fact the user is not logged in.
But when I try to go to any other page of my app I get an empty screen, so I tried to remotely debug it using PG remote debugger. Every time I try to load anything but my homepage I loose connection to my target. I haven't seen any JS errors in console.
This is the only thing in the logs:
"exception firing pause event from native"
"exception firing resume event from native"
Is there some part of configuration that I missed that could cause this behavior, or is there another way I can debug this?
Since you are using angularJS, I'm guessing you are using a webserver locally to make the app run on your browser, so everything seem to work fine
Although PhoneGap uses a file server to run your app on WebView, which is similar to just opening the index.html on browser without webserver. Bottom line is if you can make your app work on desktop browser by just opening your index.html without webserver then it will work when u build as PhoneGap app.
You might run into Cross-Origin issues when testing your app on browser, this will happen if your app is making REST API calls or if you are loading angularJS templates from another .html file, these Cross-Origin restrictions are taken care in PhoneGap build. So when testing on local browser you might want to open Chrome with web security disabled.
If you have developed your app using a webserver to test, then you might have absolute URLs for loading assets or hrefs, you will have to change these to relative URL paths.
For example, change <a href="/#/next-page"> to <a href="#/next-page">, or <img src="/images/logo.png"> to <img src="images/logo.png">

Highcharts over SSL on GAE

This is my first post on stackoverflow, I've looked around and haven't found an answer to this one yet:
I've got highcharts in a gwt application running on gae. Over http highcharts works fine, forcing https through setting security-constraint as CONFIDENTIAL in web.xml causes the application to be unable to render charts.
In main html page I am calling is 'script type="text/javascript" src="js/highstock.js">
Must the application allow unsecure resources in order to run highcharts then?
In case when you would like to use highstock by SSL, you need to download file from our website and load locally.

EXtJS 4.2 and Android browser

I have a bunch of components that I am calling setValue on, everything is working fine in all browsers except the Android web browser and google chrome for android. Has anyone seen this behavior or knows how to solve it? I don't know where to really begin.
Ok you have to enable Javascipt for the Web View as android disables JS by default due to security reasons
YourWebView.getSettings().setJavaScriptEnabled(true);
YourWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
That should so the trick
if your app has secure data you probably don't want 3rd party software running JS in your app
Hope this helps

es5-shim or chrome frame for making angular apps work in IE

I am developing rich frontend apps which will be used by users running IE 8 and above. I am using angular.js as my frontend framework.
I currently see two choices using es5shim or google chrome frame. What I am not able to discern are the differences between both.
As I understand that es5-shim monkey patches the js engine, and is much more lighter as it doesnt require the user to download and install.
What does chrome frame provide over es5-shim, and which is recommended?
Google Chrome Frame is a application, and need user to install it, es5-shim is JavaScript code, you just need to include it.
If you want to use AngularJS in in IE, you should read this: http://docs.angularjs.org/guide/ie. Long in short, include es5-shim(optional but really useful) and JSON polyfill.

Resources