Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Error: [$injector:unpr] Unknown provider: $rootElementProvider <- $rootElement <- $location  #6888

@realuserofgit

Description

@realuserofgit

I am getting this error while running karma run

i came to know that it is by missing the dependent files

but in my karma file

files: [
'app/js/vendor/angular/angular.js',
'app/js/vendor/angular/angular-route.js',
//module file
'app/js/app.js',
// services
'app/js/services/account.js',
//main file
'app/js/app/testAppController.js'
//test files
'test/*_/_Spec.js'
]

my app testAppController needs $location

like
myApp.controller('testAppController ', function($scope, $rootScope, $location){...})

while running the app everything is fine ..
but in karma run it shows this error

Error: [$injector:unpr] Unknown provider: $rootElementProvider <- $rootElement <- $location

How to fix this ???

I cant get in stack overflow about this issue!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions