Angular Material md dialog locals giving unknown provider error
<p>I am trying to pass a variable with the md dialog service but it is giving me unknown provider error for the md dialog service</p>
<p>What I have tried so far is as follows -</p>
<pre><code>$mdDialog.show({
                controller: 'SignInModalController',
                templateUrl: 'views/partials/signin_modal.html',
                targetEvent: ev,
                size: 'sm',
                parent: angular.element(document.body),
                locals: {
                    &quot;login_cookies&quot;: cookies
                }
            })
</code></pre>
<p>I am trying to pass this locals object to the sign in modal controller which has the following code - &gt;</p>
<pre><code>app.controller('SignInModalController', ['$scope', '$stateParams', '$location', '$mdDialog', 'Auth', '$mdToast', 'login_cookies',
    function($scope, $stateParams, $location, $mdDialog, Auth, $mdToast, login_cookies) {
</code></pre>
<p>and I am getting the following error message in console after this - &gt;</p>
<pre><code>Error: [$injector:unpr] Unknown provider: login_cookiesProvider &lt;- login_cookies &lt;- SignInModalController
http://errors.angularjs.org/1.4.3/$injector/unpr?p0=login_cookiesProvider%20%3C-%20login_cookies%20%3C-%20SignInModalController
</code></pre>
<p>Also the sign in modal controller file is lazily loaded during the initial bootstrapping of angular app like this - &gt;</p>
<pre><code>.state('app', {
                        abstract: true,
                        url: '/app?feedback',
                        views: {
                            '': {
                                templateUrl: 'views/layout.html'
                            },
                            'aside': {
                                templateUrl: 'views/aside.html'
                            },
                            'content': {
                                templateUrl: 'views/content.html'
                            }
                        },
                        resolve: load([
                            'scripts/google_analytics.js',
                            'scripts/controllers/app/aside.js',
                            'scripts/controllers/app/navbar.js',
                            'scripts/controllers/app/reach_us.js',
                            'scripts/controllers/app/labs/filter.ctrl.js',
                            'scripts/controllers/app/signin_modal.js',
                            'scripts/controllers/app/feedback.js'])
                    })
</code></pre>
<p>What other things should I check in order to resolve this error ?</p>
<h2>UPDATE</h2>
<p>On setting a breakpoint in the dialog controller as soon as I open the dialog I get the following result -</p>
<p><a href="https://i.stack.imgur.com/SMIGA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SMIGA.png" alt="debug" /></a></p>
<p>As you can see the passed array (<code>list_cookies</code>) does have a value and yet in the console I am getting this error -</p>
<p><a href="https://i.stack.imgur.com/GMneW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GMneW.png" alt="console" /></a></p>
<p>Any suggestions ?</p>