Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 恢复到安装bower构件之前的状态_Angularjs_Bower_Restore_Bower Install - Fatal编程技术网

Angularjs 恢复到安装bower构件之前的状态

Angularjs 恢复到安装bower构件之前的状态,angularjs,bower,restore,bower-install,Angularjs,Bower,Restore,Bower Install,我刚刚用Bower安装了angular pdf,在安装过程中,它要求我 Unable to find a suitable version for angular, please choose one: 1) angular#>=1 <1.3.0 which resolved to 1.2.28 and is required by angular-bootstrap#0.12.0 2) angular#1.3.15 which resolved to 1.3.15

我刚刚用Bower安装了
angular pdf
,在安装过程中,它要求我

Unable to find a suitable version for angular, please choose one:
    1) angular#>=1 <1.3.0 which resolved to 1.2.28 and is required by angular-bootstrap#0.12.0
    2) angular#1.3.15 which resolved to 1.3.15 and is required by angular-cookies#1.3.15, angular-pdf#0.4.0
    3) angular#>= 1.0.8 which resolved to 1.4.1 and is required by ui-router#0.2.13Prefix the choice with ! to persist it to bower.json
找不到适合angular的版本,请选择一个:
1) 角度#>=1=1.0.8,解析为1.4.1,是ui路由器所需的#0.2.13在选项前面加上前缀!将其持久化到bower.json
我认为最好使用最旧的版本以获得最大的兼容性,所以我选择了3

然而,这似乎造成了一些问题。首先,它似乎重新安装了

当我现在运行我的网站时,我得到了

TypeError: $browser.addPollFn is not a function
    at Object.<anonymous> (angular-cookies.js:60)
    at Object.invoke (angular.js:4443)
    at Object.enforcedReturnValue [as $get] (angular.js:4296)
    at Object.invoke (angular.js:4443)
    at angular.js:4261
    at getService (angular.js:4402)
    at Object.invoke (angular.js:4434)
    at Object.enforcedReturnValue [as $get] (angular.js:4296)
    at Object.invoke (angular.js:4443)
    at angular.js:4261
TypeError:$browser.addPollFn不是函数
反对。(www.js:60)
在Object.invoke(angular.js:4443)
在Object.enforcedReturnValue[as$get](angular.js:4296)
在Object.invoke(angular.js:4443)
在angular.js:4261
在getService(angular.js:4402)
在Object.invoke(angular.js:4434)
在Object.enforcedReturnValue[as$get](angular.js:4296)
在Object.invoke(angular.js:4443)
在angular.js:4261
有没有办法让我恢复到运行这个Bower安装之前的状态


谢谢

在您的
bower.json
中,您将有一部分提到您使用的角度分辨率

大概是这样的:

"resolutions": {
    "angular": ">= 1.0.8"
}

只需删除此部分,然后在您的
devdeependencies
中将“angular”版本设置为
1.3.15
,最后在Terminal中运行
bower install
,我认为angular与1.3.15版将生效。

这似乎是一个愚蠢的问题,但是你在使用任何版本控制吗?@ZackTanner是的,我在使用git,但我之前有一段时间没有提交