 app.directive 'uiClass',['$state', '$stateParams','$interpolate',Link]
 
 
-controller = class
-  constructor:(@$)->
+$controller 'monster-directives/pagination', class
+  constructor:->
     @$.has_next_page     = @has_next_page
     @$.has_previous_page = @has_previous_page
     @$.next_page         = @next_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

$directive 'monsterPaginateFull', '$templateCache', '$compile', ($templateCache,$compile) ->
  scope:
    'pagination': '=monsterPaginateFull'
  controller: 'monster-directives/pagination-full'
  link:(scope,element,attrs)->
    if attrs.monsterTemplate
      html = $templateCache.get(attrs.monsterTemplate)
