title: ionicScrollDelegate with ionic (AngularJS)
body: <p>New to ionic, and trying to figure out why I can't get ionicScrollDelegate to work correctly. I have this following markup:</p>
  
  <pre><code> &lt;content has-header="true" on-refresh="refreshFriends()" padded="true"&gt;
            &lt;ion-scroll delegate-handle="myScroll"&gt;
        &lt;refresher&gt;&lt;/refresher&gt;
        ....
       &lt;/ion-scroll&gt;
  </code></pre>
  
  <p>
  And then in the controller:</p>
  
  <pre><code> angular.module('starter.controllers', [])
  
  .controller('MenuCtrl', function($scope, $ionicScrollDelegate, $http, $location, APIService) {
  
      var delegate = $ionicScrollDelegate.$getByHandle('myScroll');
  
      delegate.rememberScrollPosition('my-scroll-id');
      delegate.scrollToRememberedPosition();
      .....
  </code></pre>
  
  <p>});
  However, on load - I get this error in the console:</p>
  
  <pre><code>Error: [$injector:unpr] Unknown provider: $ionicScrollDelegateProvider &lt;- $ionicScrollDelegate
  </code></pre>
  
  <p>Any advice here? I am loading content in a ng-view, like this:</p>
  
  <pre><code>APIService.async().then(function(d) {
    if (d.meta.code == 200) {
      $scope.checkins = d.response.checkins.items;
  
    }
  });
  </code></pre>
  
  <p>So I'm not sure if there a timing thing here, but I placed the declaring of the $ionicScrollDelegate, inside this async function and had no luck.</p>
  
  <p>I believe I am following the directions correctly. Thanks!</p>
  
  <p><strong><em>UPDATE</em></strong>
  Here is the app.js code:</p>
  
  <pre><code>   angular.module('starter', ['ionic', 'ngRoute', 'ngAnimate', 'starter.services',      'starter.controllers'])
  
    .config(function ($compileProvider){
   // Needed for routing to work
    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|tel):/);
   })
  
    .config(function($routeProvider, $locationProvider) {
  
  ...
   });
  
   document.addEventListener("deviceready", function(e) {
   ionic.Platform.detect();
  }, false);
  </code></pre>