# Errors during minifying

**URL:** <https://forum.ionicframework.com/t/errors-during-minifying/2330>\
**Category:** uncategorized\
**Created:** [March 27, 2014, 3:31pm UTC](https://forum.ionicframework.com/t/errors-during-minifying/2330 "2014-03-27T15:31:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [March 27, 2014, 3:31pm UTC](https://forum.ionicframework.com/t/errors-during-minifying/2330/1 "2014-03-27T15:31:58Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![oori](https://avatars.discourse-cdn.com/v4/letter/o/ed655f/32.png) [@oori](https://forum.ionicframework.com/u/oori)\
**Post date:** [March 28, 2014, 6:39pm UTC](https://forum.ionicframework.com/t/errors-during-minifying/2330/2 "2014-03-28T18:39:02Z")

</div>

This is an old bug in ui-router 0.2.7. **ui-sref-active** is making this.  
See this conversation: [https://github.com/driftyco/ionic/pull/941](https://github.com/driftyco/ionic/pull/941)

Until that pull request is accepted, you can solve this by  
a. update to latest **ui-router** (_recommended_…)  
b. don’t use `ui-sref-active`. Use another way, for example, `ng-class="{active:$state.includes('schedule')}"`
