My apologies if this is an easy question - I’m relatively new to the framework and searched the forums before posting. I’m building an ionic app for ios. Geolocation works on the main module. However, when I move to a new module (in this case /map), I get the following error:
Can't find variable: $http
This is the code I’m attempting to execute:
angular
.module(‘eduApp.map’)
.controller(‘MapCtrl’, MapCtrl);
function MapCtrl($http, $scope, $cordovaGeolocation, $ionicLoading, $ionicPlatform) {
var vm = this;
vm.element = document.getElementById(geolocation);
console.log(element);
I’ve spent four hours trying to find a solution to this without any luck. Can anyone give me a suggestion?