Date range filter in ng-table angularjs
<p>I am using angularjs ng-tables for displaying data through django view and trying to add bootstrap date range filter in ng-table but it is showing the following error:-</p>

<blockquote>
  <p>Error: [$injector:unpr] Unknown provider:
  dateRangeFilterFilterProvider &lt;- dateRangeFilterFilter</p>
</blockquote>

<p>I want to add the date range filter so that I can search the data according to that. The filter is visible but getting the above error and filtering is not happening. I am stuck and not getting where I am doing wrong. It would be great if someone can help me with this. </p>

<p><strong>app.js</strong></p>

<pre><code>(function() {
    'use strict';

    var myapp = angular
        .module('app.tables')
        .controller('NGTableCtrl', NGTableCtrl);

function parseDate(input) {
              return Date.parse(input); 
            }

           myapp.filter("dateRangeFilter", function() {
            return function(items, from, to) {
                  var df = parseDate(from);
                  var dt = parseDate(to);
                  var result = [];        
                  for (var i=0; i&lt;items.length; i++){
                      var date_bet = items[i].datetime;
                      if (date_bet &gt; df &amp;&amp; dt &gt; date_bet)  {
                          result.push(items[i]);
                      }
                  }
                  return result;
            };
          });

    NGTableCtrl.$inject = ['$filter', '$http', 'ngTableParams', '$resource', '$timeout', 'ngTableDataService'];
    function NGTableCtrl($filter, $http, ngTableParams, $resource, $timeout, ngTableDataService) {
        var vm = this;
        vm.title = 'Controller';

        activate();





        function activate() {
          vm.today = function() {
                vm.dt2 = new Date(2015,11,26);
                vm.dt1 = new Date(2015,11,17);

              };    

              vm.today();
              vm.toggleMin = function() {
                vm.minDate = vm.minDate ? null : new Date();
              };
              vm.toggleMin();
              vm.maxDate = new Date(2020, 5, 22);

              vm.open1 = function($event) {
                vm.status1.opened = true;
              };

              vm.open2 = function($event) {
                vm.status2.opened = true;
              };

              vm.setDate = function(year, month, day) {
                vm.dt1 = new Date(year, month, day);
                vm.dt2 = new Date(year, month, day);

              };

              vm.dateOptions = {
                formatYear: 'yy',
                startingDay: 1
              };

              vm.formats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate'];
              vm.format = vm.formats[0];

              vm.status1 = {
                opened: false
              };

              vm.status2 = {
                opened: false
              };
                  var tableData = [];
                  var ratingData = [];

                vm.tableParams5 = new ngTableParams({
                page: 1,
                count: 10,
                sorting: {
                    image_url: 'asc',
                    title: 'asc',
                    seller_name: 'asc',
                    price: 'asc',
                    product_rating: 'asc',
                    vendor_rating: 'asc'     
                },
                 filter: {
                    image_url: '',
                    title: '',
                    seller_name: '',
                    price: '',
                    product_rating: '',
                    vendor_rating: ''

                }
            },{
                total:tableData.length,

                getData : function($defer,params){
                  ngTableDataService.getData( $defer, params);
                    $http.get('/reviews/').then(function(response) {
                        tableData = response.data.product_whole_data;
                        console.log(tableData);

                        var filteredData = params.filter() ?
                         $filter('filter')(tableData, params.filter()) :
                         tableData;

                        var orderedData = params.sorting() ?
                          $filter('orderBy')(filteredData, params.orderBy()) :
                          filteredData;
                          params.total(orderedData.length);

                        $defer.resolve(orderedData.slice((params.page() - 1) * params.count(), params.page() * params.count()));

                    });
                }


            });
</code></pre>

<p><strong>html</strong></p>

<pre><code>&lt;div class="panel panel-default"&gt;

      &lt;h4&gt;From Date&lt;/h4&gt;
      &lt;p class="input-group"&gt;
         &lt;input type="text" uib-datepicker-popup="{{table.format}}" ng-model="table.dt1" is-open="table.status1.opened"  max-date="'table.maxDate'" datepicker-options="table.dateOptions" date-disabled="table.disabled(date, mode)" ng-required="true"
         close-text="Close" class="form-control" /&gt;
         &lt;span class="input-group-btn"&gt;
            &lt;button type="button" ng-click="table.open1($event)" class="btn btn-default"&gt;
               &lt;em class="fa fa-calendar"&gt;&lt;/em&gt;
            &lt;/button&gt;
         &lt;/span&gt;
      &lt;/p&gt;
      &lt;h4&gt;To Date&lt;/h4&gt;
       &lt;p class="input-group"&gt;
         &lt;input type="text" uib-datepicker-popup="{{table.format}}" ng-model="table.dt2" is-open="table.status2.opened"  max-date="'table.maxDate'" datepicker-options="table.dateOptions" date-disabled="table.disabled(date, mode)" ng-required="true"
         close-text="Close" class="form-control" /&gt;
         &lt;span class="input-group-btn"&gt;
            &lt;button type="button" ng-click="table.open2($event)" class="btn btn-default"&gt;
               &lt;em class="fa fa-calendar"&gt;&lt;/em&gt;
            &lt;/button&gt;
         &lt;/span&gt;
      &lt;/p&gt;
      &lt;table ng-table="table.tableParams5" class="table" show-filter="true"&gt;
         &lt;tbody&gt;
            &lt;tr ng-repeat="product_whole_data in $data | dateRangeFilter:dt1:dt2"&gt;
               &lt;td data-title="'Channel'" filter="{ 'channel_name': 'text' }" sortable="'channel_name'" class="text-center"&gt;{{product_whole_data.channel_name}}&lt;/td&gt;
               &lt;td data-title="'Image'" filter="{ 'image_url': 'text' }" sortable="'image_url'"&gt;&lt;div class="media"&gt;&lt;img src="{{product_whole_data.image_url}}" alt="Image" class="media-box-object img-responsive img-rounded thumb64"&gt;&lt;/div&gt;&lt;/td&gt;
               &lt;td data-title="'Product Name'" filter="{ 'title': 'text' }" sortable="'title'" class="text-center"&gt;{{product_whole_data.title}}&lt;/td&gt;
               &lt;td data-title="'Seller Name'" filter="{ 'seller_name': 'text' }" sortable="'seller_name'" class="text-center"&gt;{{product_whole_data.seller_name}}&lt;/td&gt;
               &lt;td data-title="'Price'" filter="{ 'price': 'text' }" sortable="'price'" class="text-center"&gt;{{product_whole_data.price}}&lt;/td&gt;
               &lt;td data-title="'Product Rating'" filter="{ 'product_rating': 'text' }" sortable="'product_rating'" class="text-center"&gt;{{product_whole_data.product_rating}}&lt;/td&gt;
               &lt;td data-title="'Vendor Rating'" filter="{ 'vendor_rating': 'text' }" sortable="'vendor_rating'" class="text-center"&gt;{{product_whole_data.vendor_rating}}&lt;/td&gt;

            &lt;/tr&gt;
         &lt;/tbody&gt;
      &lt;/table&gt;
   &lt;/div&gt;
</code></pre>