Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is @angular in Angular 2?

Tags:

I am working on the Angular 2 documentation.

A lot of places, including the examples, Angular is referred to as @angular.

For example, on the API page:

https://angular.io/docs/ts/latest/api/

What is the significance of the @? Does it have any relevance to Angular 2 code?

like image 485
Code Whisperer Avatar asked May 11 '16 14:05

Code Whisperer


People also ask

What is Angular 2plus?

Angular (commonly referred to as "Angular 2+") is a TypeScript-based free and open-source web application framework led by the Angular Team at Google and by a community of individuals and corporations. Angular is a complete rewrite from the same team that built AngularJS.

What are the features of Angular 2?

Some Important Features of Angular 2 are:Modern, faster, and highly scalable framework. Equally useful framework for web, mobile, and desktop apps. Web components based architecture. Supports Hierarchical Dependency Injection.

Is Angular and Angular 2 same?

is the latest version of Angular. Although Angular 2 was a complete rewrite of AngularJS, there are no major differences between Angular 2 and Angular 4. Angular 4 is only an improvement and is backward compatible with Angular 2.

What is meant by metadata in Angular?

Metadata is used to decorate a class so that it can configure the expected behavior of the class. Following are the different parts for metadata. Annotations − These are decorators at the class level. This is an array and an example having both the @Component and @Routes decorator.


1 Answers

It's the name used for the scope in the NPM repository

http://blog.npmjs.org/post/116936804365/solving-npms-hard-problem-naming-packages

@angular is the scope name and all modules (core, compiler, common, platform-..., testing, router, ...) are published under that scope.

  • Angular2 versions after beta.x, and therefore >= Angular2 RC.0 use @angular

  • Versions <= Angular2 beta.x use angular2

One of the reasons they changed it that they considered 2 in Angular2 a misnomer. Currently (January 2017) we are at Angular version 4.0.0-beta.1 which should make it clear, that 2 doesn't make sense.

like image 93
Günter Zöchbauer Avatar answered Sep 21 '22 11:09

Günter Zöchbauer