[AngularJS] Re: angularjs issue

2017-07-10 Thread Sander Elias
Hi,

Eval is a reserved word in JS, so that might be the culprit.  If that's not 
it, put the thing in a plunk, and I will help you out.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Angularjs issue - $http.get not working and changed into OPTIONS - Cross domain

2014-10-30 Thread amadese
 
 
For persons who encounter the same problem, I found a solution by using the 
XDomain https://github.com/jpillora/xdomain third-party library. You have 
to implement a proxy.html file on the remote server where the service is 
located, and call the file in a script tag in the main application.

-- 
You received this message because you are subscribed to the Google Groups 
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Angularjs issue - $http.get not working and changed into OPTIONS - Cross domain

2014-10-29 Thread amadese
I have tested in Chrome and I obtain the message:

XMLHttpRequest cannot load 
http://dev.testmyserver2/myapp.cfc?method=getUserFromLoginlogin=test'. No 
'Access-Control-Allow-Origin' header is present on the requested resource. 
Origin 'http://dev.testmyserver' is therefore not allowed access. 
index.cfm:1

Nevertheless I have tested to add this lines in the file myapp.cfc:

cfheader name=Access-Control-Allow-Origin value=*
cfheader name=Access-Control-Allow-Methods value=POST, GET, PUT, 
DELETE, OPTIONS
cfheader name=Access-Control-Allow-Headers value=X-Requested-With, 
content-type

But it doesn't work... I do not know if the location of theses lines is 
correct (I have put on the top of the file)

I think that it's due to that the CORS not supported by IE9

I have equally tried to change the method $http.get into $http.jsonp. The 
function is correctly called and not changed into OPTIONS), the results are 
displayed in the response of the console but the status code is 404... and 
the results are not retrieved by Angularjs.

I do not find solutions to retrieve these data :-( and to solve the problem 
:-(

-- 
You received this message because you are subscribed to the Google Groups 
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Angularjs issue - $http.get not working and changed into OPTIONS - Cross domain

2014-10-29 Thread amadese
I have tested in Chrome and I obtain the message:

XMLHttpRequest cannot load 
http://dev.testmyserver2/myapp.cfc?method=getUserFromLoginlogin=test'. No 
'Access-Control-Allow-Origin' header is present on the requested resource. 
Origin 'http://dev.testmyserver' is therefore not allowed access. 
index.cfm:1

Nevertheless I have tested to add this lines in the file myapp.cfc:

cfheader name=Access-Control-Allow-Origin value=*
cfheader name=Access-Control-Allow-Methods value=POST, GET, PUT, 
DELETE, OPTIONS
cfheader name=Access-Control-Allow-Headers value=X-Requested-With, 
content-type

But it doesn't work... I do not know if the location of theses lines is 
correct (I have put on the top of the file)

I think that it's due to that the CORS not supported by IE9

I have equally tried to change the method $http.get into $http.jsonp. The 
function is correctly called and not changed into OPTIONS), the results are 
displayed in the response of the console but the status code is 404... and 
the results are not retrieved by Angularjs.

I do not find solutions to retrieve these data :-( and to solve the problem 
:-(

-- 
You received this message because you are subscribed to the Google Groups 
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Angularjs issue - $http.get not working and changed into OPTIONS - Cross domain

2014-10-29 Thread Sander Elias


Amadese,

you can’t use Access-Control-Allow-Origin:'*' in a lot of circumstances. In 
stead of a star, you must put the name of the domain you are calling in 
there.
in your case, that would probably be: 'dev.testmyserver'

Hope this helps a bit,
Regards
Sander
​

-- 
You received this message because you are subscribed to the Google Groups 
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Angularjs issue - $http.get not working and changed into OPTIONS - Cross domain

2014-10-28 Thread amadese
Hi,

If I use Firebug, no erro appear, the request OPTIONS appears, with the 
data, but in my alert the status value is 0, in the header I can seee:

Response header
AllowGET, HEAD, POST, TRACE, OPTIONSConnectioncloseContent-Typetext/plain; 
charset=UTF-8DateTue, 28 Oct 2014 07:36:17 GMTServerApache/2.2.3 (Red Hat)
Transfer-Encodingchunked

 Request header
Accepttext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encodinggzip, deflateAccept-Languageen-US,en;q=0.5
Access-Control-Request-He...if-modified-sinceAccess-Control-Request-Me...GET
Connectionkeep-aliveHosthttp://dev.testmyserver http://dev.testmyserver2
Originhttp://dev.testmyserver2User-AgentMozilla/5.0 (Windows NT 6.1; WOW64; 
rv:32.0) Gecko/20100101 Firefox/32.0
In the response tab I can see: 

Reload the page to get source for: 
http://dev.testmyserver2/cfc/service/myapp.cfc?method=getUserFromLoginlogin=test
 http://dev.testmyserver2



Le lundi 27 octobre 2014 14:14:38 UTC+1, Sander Elias a écrit :

 Hi Amadese,

 If you open the developer tools in your browser, what is the error you are 
 getting?

 Regards
 Sander




-- 
You received this message because you are subscribed to the Google Groups 
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Angularjs issue - $http.get not working and changed into OPTIONS - Cross domain

2014-10-28 Thread Sander Elias
Hi Amadese,

You seem to miss the needed headers for CORS, the server needs to provide 
those. (your app seems to to ok, as you get an response to an option 
request.)
With the needed headers missing, the browser will come to a full halt on 
your request, and drop things off while no data comes to your app.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Angularjs issue - $http.get not working and changed into OPTIONS - Cross domain

2014-10-27 Thread Sander Elias
Hi Amadese,

CORS is mainly a server side problem http://enable-cors.org/. Have a look 
at the site I just linked. Probably the answer for your server is right 
there.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Angularjs issue - $http.get not working and changed into OPTIONS - Cross domain

2014-10-27 Thread Sander Elias
Hi Amadese,

If you open the developer tools in your browser, what is the error you are 
getting?

Regards
Sander


-- 
You received this message because you are subscribed to the Google Groups 
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.