troch / angular-multi-step-form

An angular module for creating multi step forms / wizards

Home Page:http://troch.github.io/angular-multi-step-form

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

scope variables not available in step

noushad-pp opened this issue · comments

This is my controller

angular.module('myApp').controller('registerCtrl', function ($scope, $rootScope) {
    $scope.steps = [
            {
                templateUrl: '/views/register/step1.html',
                hasForm: true
            },
            {
                templateUrl: '/views/register/step2.html',
            }
    ];
}

scope variables of registerCtrl is accessible in step1.html but its not available in step2.html

<div class="mui-col-sm-12 noPadding registrationContainer mui---text-center">
    <div class="mui-col-md-8 mui-col-md-offset-2 registrationContent">
        <multi-step-container steps="steps" class="simple-prev-next">
            <header>
                <button ng-disabled="$isFirst()" class="btn" ng-click="$previousStep()">
                    <span class="fa fa-chevron-left"></span>Previous
                </button>

                <strong ng-bind-template="{{$getActiveIndex()}}"></strong>

                <button ng-disabled="$isLast()" class="btn" ng-click="$nextStep()">
                    Next<span class="fa fa-chevron-right"></span>
                </button>
            </header>

            <main step-container></main>
        </multi-step-container>
    </div>
</div>

What am I doing wrong?