         angular.extend options, triggerOptions
 
         showModal = (element) =>
-          element.removeClass "hide"
-          $timeout ->
-            element.addClass "visible"
-          , 0, false
+          $animate.removeClass element, "hide", ->
+            $animate.addClass element, "visible"
 
           # Update opened modal object
           @opened = {id, element, options}


      {id, options, element} = @opened

      element.removeClass "visible"
      $timeout ->
        element.addClass "hide"
      , 250, false
      @bindingEvents "unbind"
      @opened = null

      if options.moduleMethod
        element.scope().$destroy()
        element.remove()

      $rootScope.$broadcast "modalWasHidden", id

      callback?()

    bindingEvents: (action = "bind") ->
      return unless action in ["bind", "unbind"] and @opened?

  "$controller"
  "modalViews"
  "keys"
  ($rootScope, $animate, $timeout, $templateCache, $compile, $http, $controller, modalViews, keys) ->
    # Dictionary of registered modal
    registered: modalViews.registered

