Installer angular

I'm trying to add angular-ui-router to my application.

stephane@stephane-ThinkPad-X60:angular-news> bower install angular-ui-router
bower not-cached    git://github.com/angular-ui/ui-router.git#master
bower resolve       git://github.com/angular-ui/ui-router.git#master
bower not-cached    git://github.com/firebase/firebase-bower.git#current
bower resolve       git://github.com/firebase/firebase-bower.git#current
bower checkout      angular-ui-router#master
bower resolved      git://github.com/angular-ui/ui-router.git#8aed5dae5c
bower ENORESTARGET  Tag/branch current does not exist

Additional error details:
Available tags: v1.0.1, v1.0.10, v1.0.11, v1.0.12, v1.0.13, v1.0.14, v1.0.15, v1.0.17, v1.0.18, v1.0.19, v1.0.2, v1.0.3, v1.0.5, v1.0.6, v1.0.8, v1.0.9
Available branches: master

But it gives me an error.

I also tried with: bower install angular-ui-router#master but the error remained the same.

Then I edited my bower.json file and added the entry: "angular-ui-router": "0.2.8" and did a bower install command:

stephane@stephane-ThinkPad-X60:angular-news> bower install
bower not-cached    git://github.com/angular-ui/ui-router.git#0.2.8
bower resolve       git://github.com/angular-ui/ui-router.git#0.2.8
bower not-cached    git://github.com/firebase/firebase-bower.git#current
bower resolve       git://github.com/firebase/firebase-bower.git#current
bower download      https://github.com/angular-ui/ui-router/archive/0.2.8.tar.gz
bower extract       angular-ui-router#0.2.8 archive.tar.gz
bower resolved      git://github.com/angular-ui/ui-router.git#0.2.8
bower ENORESTARGET  Tag/branch current does not exist

Additional error details:
Available tags: v1.0.1, v1.0.10, v1.0.11, v1.0.12, v1.0.13, v1.0.14, v1.0.15, v1.0.17, v1.0.18, v1.0.19, v1.0.2, v1.0.3, v1.0.5, v1.0.6, v1.0.8, v1.0.9
Available branches: master

Is it me ?

Here is my bower.json file content:

{
  "name": "angular-news",
  "version": "0.0.0",
  "dependencies": {
    "angular": "1.2.16",
    "json3": "~3.3.1",
    "es5-shim": "~3.1.0",
    "bootstrap": "~3.2.0",
    "stacktrace": "0.6.0",
    "firebase": "current",
    "angular-resource": "1.2.16",
    "angular-cookies": "1.2.16",
    "angular-sanitize": "1.2.16",
    "angular-animate": "1.2.16",
    "angular-touch": "1.2.16",
    "angular-route": "1.2.16"
  },
  "devDependencies": {
    "angular-mocks": "1.2.16",
    "angular-scenario": "1.2.16"
  },
  "appPath": "app"
}

UPDATE:

The firebase dependency seems to be the issue.

I tried the command:

bower install firebase
bower not-cached    git://github.com/firebase/firebase-bower.git#current
bower resolve       git://github.com/firebase/firebase-bower.git#current
bower cached        git://github.com/angular-ui/ui-router.git#0.2.8
bower validate      0.2.8 against git://github.com/angular-ui/ui-router.git#0.2.8
bower cached        git://github.com/firebase/firebase-bower.git#1.0.18
bower validate      1.0.18 against git://github.com/firebase/firebase-bower.git#*
bower new           version for git://github.com/firebase/firebase-bower.git#*
bower resolve       git://github.com/firebase/firebase-bower.git#*
bower download      https://github.com/firebase/firebase-bower/archive/v1.0.19.tar.gz
bower extract       firebase#* archive.tar.gz
bower resolved      git://github.com/firebase/firebase-bower.git#1.0.19
bower ENORESTARGET  Tag/branch current does not exist

Additional error details:
Available tags: v1.0.1, v1.0.10, v1.0.11, v1.0.12, v1.0.13, v1.0.14, v1.0.15, v1.0.17, v1.0.18, v1.0.19, v1.0.2, v1.0.3, v1.0.5, v1.0.6, v1.0.8, v1.0.9
Available branches: master

Since the error message showed the only available branch to be: master I then edited my bower.json file to change the dependencey to "firebase": "master" and tried to bower install again:

stephane@stephane-ThinkPad-X60:angular-news> bower install firebase
bower not-cached    git://github.com/firebase/firebase-bower.git#master
bower resolve       git://github.com/firebase/firebase-bower.git#master
bower cached        git://github.com/angular-ui/ui-router.git#0.2.8
bower validate      0.2.8 against git://github.com/angular-ui/ui-router.git#0.2.8
bower cached        git://github.com/firebase/firebase-bower.git#1.0.19
bower validate      1.0.19 against git://github.com/firebase/firebase-bower.git#*
bower checkout      firebase#master
bower not-cached    git://github.com/firebase/firebase-bower.git#master
bower resolve       git://github.com/firebase/firebase-bower.git#master
bower checkout      firebase#master
bower resolved      git://github.com/firebase/firebase-bower.git#86ea9e429c
bower resolved      git://github.com/firebase/firebase-bower.git#86ea9e429c

Unable to find a suitable version for firebase, please choose one:
    1) firebase#master which resolved to 86ea9e429c and is required by angular-news 
    2) firebase#~1.0.19 which resolved to 1.0.19

Prefix the choice with ! to persist it to bower.json


[?] Answer: 1
bower install       firebase#86ea9e429c
bower install       angular-ui-router#0.2.8

firebase#86ea9e429c app/bower_components/firebase

angular-ui-router#0.2.8 app/bower_components/angular-ui-router
└── angular#1.2.16

Kind Regards,

Stephane Eybert

链接地址: http://www.djcxy.com/p/20096.html

上一篇: 用wiredep加载库

下一篇: 安装角度