Coder Social home page Coder Social logo

Comments (5)

troch avatar troch commented on September 21, 2024

Can you give me an example to reproduce? Thanks.

from angular-multi-step-form.

bagwanpankaj avatar bagwanpankaj commented on September 21, 2024

I put up a bare minimum angular app here. MultiStep form can be found at /#/about. The issue is as follows

1.) angular form object is available within the template it is defined (step_1.html and step_2.html templates)
2.) angular form object is not available in wrapper template that defines <multi-step-container steps="steps"> (defined in about.html)
3.) angular form object is not available in AboutCtrl. Since it can not pased as well via nextStep function, see point#2

from angular-multi-step-form.

troch avatar troch commented on September 21, 2024

I think this is expected. The form object (from Angular's <form> directive) will be added to the scope of the step it is in. Therefore you cannot access it from either the scope of the multi-step form directive or your surrounding scope (used by AboutCtrl).

What you can do is something similar to this: https://github.com/troch/angular-multi-step-form/blob/master/src/directives/form-step-validity.js. With a custom directive, you can grab your form instance (formCtrl) and pass it to another controller or factory.

from angular-multi-step-form.

bagwanpankaj avatar bagwanpankaj commented on September 21, 2024

Got that. Thanks

from angular-multi-step-form.

troch avatar troch commented on September 21, 2024

One another thing you can do, depending on your use case, is to have a surrounding <form> rather than forms in each step.

from angular-multi-step-form.

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.