Hello All -

Very new to Angular and trying out some tutorials in concert with using Go 
lang - in setting up web-services from my VM.

I am running Go as a service within a VM and port forwarding (3000) to my 
web browser on my host.

...
My Python / Go application works fine from my host browser if I run on 
address 0.0.0.0 rather than address 127.0.0.1.

The pages serve fine but then when I set up services from Go to be 
connected from by Angular, Angular is not making the connection.

I am wondering if it has something to do with running in my VM?

...
Since I am running on port 3000 I modified the tutorial example in creating 
the app as follows:

var myapp = new angular.module("myapp", ["ngResource"]);

// inject the $resource dependency here
myapp.controller("MainCtl", ["$scope", "$resource", function($scope, 
$resource){
var Book = $resource("books:3000/:id", {id: "@id"}, {});
$scope.books = Book.query();
}]);

So I am using *books:3000/:id* as the URI - Is this correct? Or should the 
service remain as: *books/:id*?
...
Error I am getting is below:

Exception { message: "", result: 2153644038, name: "", filename: 
"http://code.angularjs.org/1.3.6/angular.min.js";, lineNumber: 86, 
columnNumber: 0, inner: null, data: null, stack: 
"wf/<@http://code.angularjs.org/1.3.6/angular.min.js:86:165
m@http://code.angularjs.org/1.3.6/angular.min.js:82:0
l/f<@http://code.angularjs.org/1.3.6/angular.min.js:80:203
f/<@http://code.angularjs.org/1.3.6/angular.min.js:111:424
Ne/this.$get</k.prototype.$eval@http://code.angularjs.org/1.3.6/angular.min.js:125:300
Ne/this.$get</k.prototype.$digest@http://code.angularjs.org/1.3.6/angular.min.js:122:389
Ne/this.$get</k.prototype.$apply@http://code.angularjs.org/1.3.6/angular.min.js:126:55
sc/d/<@http://code.angularjs.org/1.3.6/angular.min.js:17:445
e@http://code.angularjs.org/1.3.6/angular.min.js:37:16
sc/d@http://code.angularjs.org/1.3.6/angular.min.js:17:366
sc@http://code.angularjs.org/1.3.6/angular.min.js:18:152
Hd@http://code.angularjs.org/1.3.6/angular.min.js:16:482
@http://code.angularjs.org/1.3.6/angular.min.js:249:237
a@http://code.angularjs.org/1.3.6/angular.min.js:163:398
jf/c@http://code.angularjs.org/1.3.6/angular.min.js:32:279
" }

...
There is another message stating that *getPreventDefault() is deprecated, 
use defaultPrevented instead*.

...
Also, I tried moving my scripts to angular 1.3.8 but that update did not 
seem to work, still getting 1.3.6 erros.
Eg. The tutorial was written in 1.2.10 and when I moved to 1.3.6 I saw the 
errors noting 1.3.6.

...
However please note by test page with a BootStrap control works - however 
Angular is not.

Thank you for your help.

Mono

-- 
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.

Reply via email to