I’m going through the painful process of minifying my code and came across this error.
Error: [$injector:unpr] Unknown provider: dProvider <- d
Its coming from a side menu where I’m providing a controller inline to just the left side menu.
<ion-side-menu side="left" ng-controller="ListCtrl">
<div class="bar bar-header bar-dark">
<a class="button button-clear button-full title dark-head" ui-sref="home">
Main Menu
</a>
</div>
<ion-content class="has-header" has-bouncing="true">
<div class="list">
<a ng-repeat="pet in pets" class="item" ui-sref="main.detail({petsId: pet.id })" ui-sref-active="active" menu-toggle="left">
<p>{{pet.title}}</p>
</a>
</div>
</ion-content>
</ion-side-menu>
And the controller is a modified version of the seed app’s controller
.controller('IndexCtrl', [ 'PetService', '$scope',function (PetService, $scope) {
// 'Pets' is a service returning mock data (services.js)
'use strict';
$scope.pets = PetService.all();
}]);
And this controller is being used by two views, one as a list to display the items, and the second is the side menu described above. Is my code properly annotated somehow? Any ideas on why I’m getting this error?