Giter Club home page Giter Club logo

Comments (11)

Pagebakers avatar Pagebakers commented on July 18, 2024 1

Be sure to add aldeed:simple-schema to your project aswell.

from meteor-wizard.

benco5 avatar benco5 commented on July 18, 2024

So, isn't this added as a dependency?

meteor add forwarder:autoform-wizard

Changes to your project's package version selections:

aldeed:autoform            added, version 5.0.3
aldeed:simple-schema       added, version 1.1.0
forwarder:autoform-wizard  added, version 0.6.4
momentjs:moment            added, version 2.8.4

Additionally, I did try adding aldeed:simple-schema on it's own, but didn't help. Also tried moving relevant code around to test loading order, but to no avail.

from meteor-wizard.

Pagebakers avatar Pagebakers commented on July 18, 2024

Only autoform is a dependency, simple-schema isn't used by the wizard.

Try putting your code in Meteor.startup(function(){}); , it shouldn't be necessary but maybe it helps.
I can't really see what's going wrong here otherwise.

from meteor-wizard.

benco5 avatar benco5 commented on July 18, 2024

Assuming packages are not the issue, what is the bare minimum code needed to get a generic wizard going so I can test what breaks it?

from meteor-wizard.

Pagebakers avatar Pagebakers commented on July 18, 2024

Have you tried running the example on your machine? https://github.com/forwarder/meteor-wizard-example

from meteor-wizard.

benco5 avatar benco5 commented on July 18, 2024

Yes, just cloned and tested the example. Works fine. Going to give it another go for my project.

from meteor-wizard.

benco5 avatar benco5 commented on July 18, 2024

Yeah, so weird. After deleting all my code and re-adding the package with what seems to be most basic code necessary I'm still getting:

Your app is crashing. Here's the latest log.


/Users/costanzab/.meteor/packages/meteor-tool/.1.1.3.1wysac9++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
                        throw(ex);
                              ^
ReferenceError: SimpleSchema is not defined
  at app/lib/wizard.js:5:28
  at app/lib/wizard.js:32:3
...

from meteor-wizard.

benco5 avatar benco5 commented on July 18, 2024

Did meteor add aldeed:simple-schema. I was able to see my wizard template by 'manually' telling FlowRouter to find it. Then I went to setup the Wizard / FlowRouter bind and now get the error:

ReferenceError: Wizard is not defined
  at app/lib/router.js:45:3

Do I need to add another package on my own, or ... ???

I assumed I should put the following code in my router.js

Wizard.registerRouter('flow:router', {
  go: function(name, stepId) {
    FlowRouter.go(name, this.getParams(stepId));
  },
  getParams: function(stepId) {
    var route = Router.current()
      , params = route.params || {};

    return _.extend(params, {step: stepId});
  },
  getStep: function() {
    return FlowRouter.getParam('step');
  },
  path: function(name, stepId) {
    return FlowRouter.go(name, this.getParams(stepId));
  }
});

and lastly, below in my client code:
Wizard.useRouter('flow:router');

... Why is it 'flow:router' and not 'meteorhacks:flow-router' by the way?

from meteor-wizard.

Pagebakers avatar Pagebakers commented on July 18, 2024

Wizard is only available on the client, so make sure to wrap it in Meteor.isClient or put it somewhere in the client folder. You can name it whatever you like, meteorhacks:flow-router makes more sense indeed.

from meteor-wizard.

Pagebakers avatar Pagebakers commented on July 18, 2024

I moved the Iron Router and Flow Router binding into separate packages and updated the wizard package. Please see the updated docs on how to use https://github.com/forwarder/meteor-wizard#routers

I also updated the Flow Router package and example to use meteorhacks:flow-router instead of flow:router, thanks.

from meteor-wizard.

benco5 avatar benco5 commented on July 18, 2024

I did get the wizard working nicely. Will checkout the FR package for my routes. Thanks for the help and prompt responses!

from meteor-wizard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.