Giter Site home page Giter Site logo

Comments (8)

AidasK avatar AidasK commented on July 24, 2024

I would suggest you to init flow on top of <html> tag. This way flow will be initialized on all pages with the same instance.

from ng-flow.

themcguy avatar themcguy commented on July 24, 2024

I think the problem is that I'm attempting to use ng-flow inside a modal. Should I be able to do this? It seems that $flow is undefined when I do.

from ng-flow.

amerjx avatar amerjx commented on July 24, 2024

@themcguy did you get an answer to your question? i am trying the the same too

from ng-flow.

mparisi76 avatar mparisi76 commented on July 24, 2024

I ended up going with a different solution using node fs. Flow seems to be a good solution when you expect large file sizes where chunking would benefit, but it wasn't in my requirements. Good luck.

from ng-flow.

AidasK avatar AidasK commented on July 24, 2024

It should work ok in modals if they don't use isolated scope.
UI bootstrap allows you to set scope option, which is by default a root scope. You could set it to controller scope and it should work.

If flow is initialized on <html> or <body> it should be available to use in modals by default, because they inherit root scope.

from ng-flow.

dtrack avatar dtrack commented on July 24, 2024

AidasK I just ran into the problem that themcguy was having.
Even If I make the modal scope be a child of my controller scope, I have an error because the flow directives inside the modal (I need the drop and img directive) require "^flowInit" which are not in their ancestor line.
Also I do need flow to be limited to the scope of my controller, as I could have different flow obj initiated in different controllers.
It might be worth to have flowInit accept an existing $flow obj

from ng-flow.

AidasK avatar AidasK commented on July 24, 2024

@dtrack You can make a pull request for this feature.
https://github.com/flowjs/ng-flow/blob/master/src/directives/init.js#L5
If $attrs.flowObject is defined, do not create new flow object.

from ng-flow.

bjDesign avatar bjDesign commented on July 24, 2024

Holy crap, AidasK. Thanks for your answer on Mar 27, 2014. I fought with this all day today. So simple.

from ng-flow.

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.