   has_previous_page:=> !@$.$parent.pagination?.first_page
 directive = () ->
   priority: 1000
-  controller: ['$scope', controller]
+  controller: 'monster-directives/pagination'
   scope: {}
   template: '''
     <div class="button" ng-click="previous_page()">

      scope.$watch attrs.tableHeading       , resize
      scope.$on 'data_heading'              , resize

controller = $mkcontroller class
  constructor:->
    @$.has_next_page     = @has_next_page
    @$.has_previous_page = @has_previous_page

app.directive 'uiClass',['$state', '$stateParams','$interpolate',Link]


$controller 'monster-directives/pagination', class
  constructor:->
    @$.has_next_page     = @has_next_page
    @$.has_previous_page = @has_previous_page
    @$.next_page         = @next_page
