   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()">

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


controller = class
  constructor:(@$)->
    @$.has_next_page     = @has_next_page
    @$.has_previous_page = @has_previous_page
    @$.next_page         = @next_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)
