CL,

yes, the docs for javascript are really outdated.

To answer your doubts :

#1 : Yes, "angular" global variable was renamed to "ng", long time ago. And 
yes, again, you need to use "ng.core".

#2 : Every *Annotation class was renamed to *Metadata.

#3: Yes, it must be "ng.platform.browser.bootstrap"

So at the end your code must look like this

function DisplayComponent() {
    this.myName = "Alice";
}
DisplayComponent.annotations = [
  new ng.core.ComponentMetadata({   // You can do just ng.core.Component
      selector: "display"
  }),
  new ng.core.ViewMetadata({ // You can do just ng.core.View, and you can 
skip View as well since it's optional
      template:
         '<p>My name: {{ myName }}</p>'
  })
];

// Bootstrapping

document.addEventListener('DOMContentLoaded', function() {
  ng.platform.browser.bootstrap(DisplayComponent);
});


Hope it helps

-- 
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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to