Skip to content

abhishek194/angularjs-wizard-directive

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angularjs-wizard-directive

###Run

 node sample/web-server.js
 localhost:8000/index.html/#wizard

ScreenShot

ScreenShot

ScreenShot

Dependencies

  • angularjs
  • twitter bootstrap (css only)

How to use it

###See sample folder

var app = angular.module('app', ['widgets']);

Directives

  • Directive wizard - main directive (have n wizard-group)
  • Directive wizard-group - content directive
<wizard config="wizard" on-validation-step="vm.validationStep" on-completed-wizard="vm.completeWizard" next="next" previous="previous" end="Finish">
        <wizard-group title="Account Data" active="true">
           ...
        </wizard-group>
        <wizard-group title="Profile">
           ...
        </wizard-group>
        
    </wizard>

Methods

  • on-validation-step - fired when change step
  • on-completed-wizard - fired when finish button is clicked

###Controller

 vm.validationStep = function(item, actions) {
      if(vm.user.email.length<=0)
          actions.error(['email is required']);
      else
          actions.success();
  }

  vm.completeWizard = function(scope, actions) {
      console.log('completed');
  }
       
  • item object - contains step info
{name: "Account Data", index: 0, active: "active"}
  • action object - contains callback functions
{success: function, error: function}

Grunt and Bower tasks

  • Install dependencies
 bower install
  • Build directive
 grunt build
  • Build sample
 grunt sample

About

angularjs wizard directive

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 67.3%
  • CSS 18.3%
  • HTML 14.4%