$scopeProvider <- $scope/ Unknown provider

后端 未结 3 582
执笔经年
执笔经年 2021-02-05 10:02

I testing my angular-application with jasmine(http://jasmine.github.io/2.0/) and getting next error: Unknown provider: $scopeProvider <- $scope I know, that it\'s incorrect

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-05 10:06

    Normally, a $scope will be available as an injectable param only when the controller is attached to the DOM.

    You need to associate somehow the controller to the DOM (I'm mot familiar with jasmine at all).

提交回复
热议问题