title: TypeError: Cannot read property 'slice' of undefined
body: <p>I use this script for page pagination like in this tutorial <a href="http://fdietz.github.io/recipes-with-angular-js/common-user-interface-patterns/paginating-through-client-side-data.html" rel="nofollow">http://fdietz.github.io/recipes-with-angular-js/common-user-interface-patterns/paginating-through-client-side-data.html</a></p>
  
  <pre><code>app.filter('offset', function() {
      return function(input, start) {
          start = parseInt(start, 10);
          return input.slice(start);
      };
  });
  </code></pre>
  
  <p>Everything went fine, except that I got an error </p>
  
  <pre><code>TypeError: Cannot read property 'slice' of undefined
  at k.&lt;anonymous&gt; (http://www.foo.com/43267ztX/default/:18:17)
  at e (http://www.foo.com/43267ztX/default/js/angular.min.js:171:180)
  at db.| (http://www.foo.com/43267ztX/default/js/angular.min.js:160:65)
  at F.constant (http://www.foo.com/43267ztX/default/js/angular.min.js:170:82)
  at db.| (http://www.foo.com/43267ztX/default/js/angular.min.js:160:70)
  at F.constant (http://www.foo.com/43267ztX/default/js/angular.min.js:170:82)
  at Object.$watch.p (http://www.foo.com/43267ztX/default/js/angular.min.js:107:159)
  at k.$digest (http://www.foo.com/43267ztX/default/js/angular.min.js:109:78)
  at k.$apply (http://www.foo.com/43267ztX/default/js/angular.min.js:112:173)
  at h (http://www.foo.com/43267ztX/default/js/angular.min.js:72:300) &lt;/pre&gt;
  </code></pre>