0.0.46 • Published 6 years ago

ngx-wizard v0.0.46

Weekly downloads
90
License
MIT
Repository
github
Last release
6 years ago

ngx-wizard

Simple angular library for creating wizard. For now without styles

NPM

Prerequisite

Angular is required. Bootstrap is required.

Installation

npm

npm install ngx-wizard

yarn

yarn add ngx-wizard

Integration

  1. Install library
  2. Import Module into the app.module
import { WizardModule } from "ngx-wizard";

@NgModule({
    imports: [..., WizardModule],
    declarations: [...],
    bootstrap: [...],
    providers: [...]
})
  1. Also for now bootstrap is needed.

Examples

<wizard nextButtonClass='my-custom-class' prevButtonClass='my-custom-class' #wizard>
	<tab [index]="1" previousButton="hidden" [isNextButtonDisabled]='true' nextButton="hidden" icon="iso" class="my_class">
		<!--Any content that you need-->
	</tab>
	<tab [index]="0" (isSelect)="doSomeAction()" nextButton="go next">
		<!--other tab-->
		<!--Any content that you need-->
	</tab>
	<!-- Any anounts of tabs -->
</wizard>

... component.ts
@ViewChild(#wizard) wizard: WizardComponent //you can access properties by using ViewChild
anyMethod(): void {
    wizard.tabs: Array<TabDirective> //=> list of active(index must be >= 0) tabs, only avaliable after View Init
    wizard.activeTab: TabDirective //=> get the activeTab
    
    //you can manualy fire nextTab
    wizard.nextTab(false/*emitContinue*/); //input parameter => set to fire onContinueClicked event
}
...

Wizard Options

/*Input params*/
 nextButtonClass: string = "pull-right" //=> will add custom class to the nextButton, default class is "btn btn-next btn-fill btn-wd"
 prevButtonClass: string = "pull-left" //=> will add custom class to the previousButton, default class is "btn btn-previous btn-fill btn-default btn-wd"
 nextIconClass: string = "material-icons" //=> will add custom class to the nextButton Icon, default class is "material-icons"
 nextIconText: string = "arrow_forward" //=> will add custom text to the nextButton Icon, default text is "arrow_forward"
 prevIconClass: string = "material-icons" //=> will add custom class to the prevButton Icon, default class is "material-icons"
 prevIconText: string = "arrow_back" //=> will add custom text to the nextButton Icon, default text is "arrow_back""
 showProgressBar: boolean = false //=> show or hide progress bar, by default it's false
 showHeader: boolean = true //=> show or hide heading tabs, by default it's true

Tab Options

/*Input params*/
 heading = "string" //=> name of tab that will be displayed
 disabled = boolean //=> set enable or disabe tab
 customClass ="string" //=> will add custom class to the header
 icon = "string" //=> name of icon in the material dashboard
 previousButton ="string" //=> name of previous button, if name is "hidden" then won't show this button
 nextButton ="string" //=> name of next button, if name is "hidden" then won't show this button
 index = number //=> ordering for tabs, the lowens index wil be at the start
 active = boolean //=> manually set the active tab
 isNextButtonDisabled //=> boolean //=> set enable or disabe nextButton
 isPrevButtonDisabled //=> boolean //=> set enable or disabe prevButton
 buttonTemplate //=> ng-template - set custom prev/cont button template

/*Output params*/
isSelect - EventEmitter<event> //=> fires when tab selected
deselect - EventEmitter //=> fires when tab deselected
removed- EventEmitter //=> fires when tab removed
check - EventEmitter<event> //=> fires when tab checked
onContinueClicked - EventEmitter<event> //=> fires when nextButton clicked
onPreviousClicked - EventEmitter<event> //=> fires when prevButton clicked

//event has preventDefault method, so if you want to manualy drives the countinue or other buttons you can handle this using preventDefault()

GitHub

Please feel free to declare issues or contribute: https://github.com/AlexYaroschuck/ngx-wizard

0.0.46

6 years ago

0.0.45

6 years ago

0.0.44

6 years ago

0.0.43

6 years ago

0.0.42

6 years ago

0.0.41

6 years ago

0.0.40

6 years ago

0.0.34

6 years ago

0.0.33

6 years ago

0.0.32

6 years ago

0.0.31

6 years ago

0.0.30

6 years ago

0.0.29

6 years ago

0.0.28

6 years ago

0.0.27

6 years ago

0.0.26

6 years ago

0.0.25

6 years ago

0.0.24

6 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago