troch / angular-multi-step-form

An angular module for creating multi step forms / wizards
http://troch.github.io/angular-multi-step-form
ISC License
144 stars 44 forks source link

Angular Can't inject multiStepFormInstance #56

Closed ricardoborges closed 7 years ago

ricardoborges commented 8 years ago

Hey guys, Everything is working fine in my app with multistepform, but when I try to put the multiStepFormInstance reference on controller, the injector throws an error.

Error: $injector:unprUnknown Provider Unknown provider: multiStepFormInstanceProvider <- multiStepFormInstance <- FormController

Am I missing something?

troch commented 8 years ago

Where and how are you using FormController?

ricardoborges commented 8 years ago

Hi, sorry about the delay!

It's a single controller app, the same tag I define app and controller.

it works: angular.module('formApp', ['multiStepForm', 'checklist-model', 'angular-ladda', 'lr.upload', 'ngAnimate', 'toastr', 'ngValidate']) .controller('FormController', ['$scope', '$http', '$window', 'toastr', 'toastrConfig', function ($scope, $http, $window, toastr, toastrConfig) { but I can't inject multiStepFormInstance in this controller
ricardoborges commented 8 years ago

<div ng-app="formApp" ng-controller="FormController" class="ng-cloak" ng-init='setup("Pesquisa")'>

troch commented 8 years ago

You can only inject multiStepFormInstance in a step controller or in the multi step directive controller.