Injector error using Angulartics with AngularJS
angularjs, angulartics, google-analytics, javascript
Solution
Assuming you're reading the docs here: https://github.com/angulartics/angulartics
You need to install the angularitics.google.analytics plugin by running 'bower install angulartics-google-analytics --save'
Problem
I have problem with adding Angulartics. In my app.js I just added that two dependencies (Angulartics and the last one) you can see: ``` var smsApp = angular.module('smsApp', [ 'ngRoute', 'smsControllers', 'smsFilters', 'google-maps', 'pascalprecht.translate', 'angulartics', 'angulartics.google.analytics', ]); ``` and then in my index.html I added: ` ``` <script src="./js/angulartics.js"> <script src="./js/angulartics-ga.js"> ---- paths to these files are ok ``` ` but when I want to create that module with: ``` var injector = angular.injector(['smsApp', 'ng']); ``` I got this error: `Uncaught Error: [$injector:unpr]` http://errors.angularjs.org/1.2.15/$injector/unpr?p0=%24rootElementProvider%20%3C-%20%24rootElement%20%3C-%20%24location Without Angulartics it goes well! Please help me :) thanks I'm following this tutorial.