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

Can not use inside custom service #38

Closed rdzidziguri closed 8 years ago

rdzidziguri commented 8 years ago

Every time i try to instantiate it i get following error `Error: t.$eval(...) is undefined i/<.link.pre@http://localhost:3654/Libs/angular/angular-multistep-form.min.js:1:509 ma@http://localhost:3654/Libs/angular/angular.min.js:79:117 n@http://localhost:3654/Libs/angular/angular.min.js:64:215 g@http://localhost:3654/Libs/angular/angular.min.js:57:378 g@http://localhost:3654/Libs/angular/angular.min.js:57:395 R/<@http://localhost:3654/Libs/angular/angular.min.js:57:17 ChildContentServiceProvider/self.activate/<@http://localhost:3654/App/common/slidingPanel.js:138:42 e/<@http://localhost:3654/Libs/angular/angular.min.js:127:69 qf/this.$get</m.prototype.$eval@http://localhost:3654/Libs/angular/angular.min.js:141:269 qf/this.$get</m.prototype.$digest@http://localhost:3654/Libs/angular/angular.min.js:138:361 qf/this.$get</m.prototype.$apply@http://localhost:3654/Libs/angular/angular.min.js:142:33 g@http://localhost:3654/Libs/angular/angular.min.js:94:279 x@http://localhost:3654/Libs/angular/angular.min.js:98:369 cg/</u.onload@http://localhost:3654/Libs/angular/angular.min.js:99:397

angular.min.js:114:264 Error: At least one step has to be defined r/this.start@http://localhost:3654/Libs/angular/angular-multistep-form.min.js:1:4346 i/<.link.post@http://localhost:3654/Libs/angular/angular-multistep-form.min.js:1:1713 ma@http://localhost:3654/Libs/angular/angular.min.js:79:117 n@http://localhost:3654/Libs/angular/angular.min.js:64:405 g@http://localhost:3654/Libs/angular/angular.min.js:57:378 g@http://localhost:3654/Libs/angular/angular.min.js:57:395 R/<@http://localhost:3654/Libs/angular/angular.min.js:57:17 ChildContentServiceProvider/self.activate/<@http://localhost:3654/App/common/slidingPanel.js:138:42 e/<@http://localhost:3654/Libs/angular/angular.min.js:127:69 qf/this.$get` `(function () { 'use strict'; angular.module('PcoreManager').controller('marketConfigWizardCtrl', demoCtrl); ``` demoCtrl.$inject = ['$scope', 'close']; function demoCtrl($scope, close) { var vm = this; vm.steps = [{ templateUrl: '/Template/marketconfig/wizardStartForm', title: 'basic data collection', isolatedScope: true }]; vm.startWizard = function () { vm.wizardConfirmed = true; } vm.close = function () { close("true"); } } ``` })();' ` `
troch commented 8 years ago

At first glance, your code looks correct. It seems vm.steps don't exist when you use the directive.