You are absolutely right; thank you very much. On Sun, Dec 7, 2014 at 2:55 AM, Justin Walsh <[email protected]> wrote:
> Hi Alejandro > > I'm guessing that when you use netbeans that it is starting up some sort > of http server that you then point to. (Just guessing since I don't use > netbeans). > If that is the case: > > <script type="text/javascript" src="// > ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js"></script> > > .. resolves to *http*://ajax.googleapis.com/..... (which exists). > > Now, if you try to run it as a file, the above will resolve to file:// > ajax.googleapis.com/.... which obviously doesn't exist. > > Just one of the pitfalls of using a file based approach. There are others > too (CORS etc). > > My recommendation is to avoid the file based approach and either use: > > - Your IDE > - A simple node (express) server > - A plnkr <http://plnkr.co/> > > > Regards > Justin > > > > On Sunday, 7 December 2014 00:05:31 UTC+2, Alejandro Barrero wrote: >> >> The HTML >> <!DOCTYPE html> >> <head> >> <title>Hello World, AngularJS</title> >> </head> >> <body ng-app> >> Enter greeting: >> <input type="text" ng-model="greeting" /> >> <p>Hello <span ng-bind="greeting"></span>!</p> >> <script type="text/javascript" src="//ajax.googleapis.com/ >> ajax/libs/angularjs/1.3.5/angular.min.js"></script> >> </body> >> </html> >> Runs fine in NetBeans, but when I put it in a file iot fails in the >> browser. I am learning AngularJS so I don't know what I am missing. >> >> Your help will be greatly appreciated, >> >> Alejandro Barrero >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "AngularJS" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/angular/sJO_Hci8usY/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/angular. > For more options, visit https://groups.google.com/d/optout. > -- Sincerely, Alejandro Barrero -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
