 
     # Notify with emiting the event and calling the callback if set for the event
     $scope.$emit event
+    $scope.log("notify_listeners")
     if $scope.csWizardOptions && $scope.csWizardOptions.events
       if $scope.csWizardOptions.events[event]
         # Call the callback if it's set in the wizard options

      notify_listeners($scope, 'wizard-canceled', resource) if $scope.panelStack.length == 0

    $scope.$on 'form-submit', (event, resource, attribute) ->
      if $scope.panelStack.length == 1
        notify_listeners($scope, 'wizard-submited', resource)
        popPanel($scope) unless $scope.csWizardOptions['keep-first']
      else


    # ===== COMPILE DOM WITH APPROPRIATE DIRECTIVE ========

    csLog.set($scope, "csWizardPanel")
    #csLog.enable($scope)

    $scope.log("Start")

    if $scope.panel.directive
      $scope.log("Directive render")
