Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Angular2 beta with Bower?

Tags:

bower

angular

I'm trying to install Angular2 with Bower with command bower install -S angular2 and have next messages in console:

$ bower install -S angular2
bower angular2#*                cached git://github.com/angular/bower-angular.git#1.4.8
bower angular2#*              validate 1.4.8 against git://github.com/angular/bower-angular.git#*
bower angular#~1.4.8           install angular#1.4.8

angular#1.4.8 bower_components/angular

My bower.json file now contains next info in dependencies section:

"dependencies": {
  "angular": "angular2#~1.4.8"
}

And I have Angular 1.4.8 after that in bower_components path.

So, how to install Angular2 beta with Bower?

like image 938
Nick Avatar asked Jan 17 '16 18:01

Nick


3 Answers

I have installed it from github with the command bower install [email protected]:angular/angular.git:

$ bower install [email protected]:angular/angular.git
bower angular#*             not-cached [email protected]:angular/angular.git#*
bower angular#*                resolve [email protected]:angular/angular.git#*
bower angular#*               checkout 2.0.0-build.ffbcb26.js
bower angular#*           invalid-meta angular is missing "main" entry in bower.json
bower angular#*           invalid-meta angular is missing "ignore" entry in bower.json
bower angular#*               resolved [email protected]:angular/angular.git#2.0.0-build.ffbcb26.js
bower angular#~2.0.0-build.ffbcb26.js          install angular#2.0.0-build.ffbcb26.js

angular#2.0.0-build.ffbcb26.js bower_components/angular
like image 145
Nick Avatar answered Oct 21 '22 16:10

Nick


This worked for me, for Angular 2 bower install angular2-build

like image 43
Savan Akbari Avatar answered Oct 21 '22 16:10

Savan Akbari


I advise you not to use Bower. Bower is used to get your packages in your project folder, that's it.

Try to look up JSPM (http://jspm.io). It does a lot more than getting packages in your project. It takes care of ES6 to ES5. And loads all your packages in one time using SystemJS in your browser with just a couple lines of code.

you can install jspm using npm:

npm init
npm install (-g) jspm // -g only if you want jspm globally installed

jspm init
like image 27
Angelo A Avatar answered Oct 21 '22 16:10

Angelo A