Coder Social home page Coder Social logo

Comments (8)

charandas avatar charandas commented on May 17, 2024

I have an inkling it has to do with ocLazyLoad reconfig flag, which has worked for me so far. But in this case, when loading the second lazy loaded state, it appears, the config blocks don't run for the lazy loaded module. I will create an issue there.

Any comments welcome.

from ui-router-extras.

charandas avatar charandas commented on May 17, 2024

ocombe/ocLazyLoad#54

from ui-router-extras.

charandas avatar charandas commented on May 17, 2024

@christopherthielen I was re-reading some docs when it dawned on me, I could be using the StateFactory in an unspecified way. Docs state:

StateFactory factories convert a FutureState into a full UI-Router state

Question:
Was it your intent that a factory should just return 1 ui-router state? The case for me, often, is that once I know there is a facility that my application needs to provide, I need to register multiple states, all defined in a requirejs module. However, the StateFactory recommendation for returning exactly one fullUiRouterState seems limiting.

My Factory:
The promise of my factory doesn't return anything when using ocLazyLoad. I am relying on its reconfig totally to get me the effect of loading all ui-router states.

Your Factory:
Along the similar lines, your example also doesn't return a ui-router state, although reading the code might confuse one into thinking that it does return an object.
The example code for ui-router-extras uses result.entryState like such:
https://github.com/christopherthielen/ui-router-extras/blob/gh-pages/example/future/app.js#L79
However, module1 code never returns an entryState through its requirejs module.
https://github.com/christopherthielen/ui-router-extras/blob/gh-pages/example/future/module1.js#L36

Are you aware of this anomaly?

Why I am using ocLazyLoad and not angularAMD
My angular modules are constructed using multi-file (separate for controllers, directives, services, states etc.) requirejs modules. angularAMD, as of current, doesn't support multi-file lazy require-module loading.

from ui-router-extras.

christopherthielen avatar christopherthielen commented on May 17, 2024

Hey, just wanted to let you that I'm very interested in your ocLazyLoad implementation.

You are correct about the docs being misleading regarding returning a full ui-router state. My ngload example is exactly doing what you think it's doing. I meant to go back and correct the API, but I've been extremely busy with back to back to back 70 hour work weeks.

I should come up to breathe next week and will be looking through your comments then. Keep this issue open!

from ui-router-extras.

christopherthielen avatar christopherthielen commented on May 17, 2024

#43 dupe

from ui-router-extras.

charandas avatar charandas commented on May 17, 2024

@christopherthielen as I guessed, there was an issue with ocLazyLoad missing config blocks in a certain case. Its fixed. My example is up and running, and so is a little post about my experience.

from ui-router-extras.

christopherthielen avatar christopherthielen commented on May 17, 2024

nice! When I have time I'll probably add ocLazyLoad into the ui-router-extras demo page based on your demo site, assuming that's ok with you.

from ui-router-extras.

charandas avatar charandas commented on May 17, 2024

Its absolutely ok with me. I am happy that people can get rolling with futureStates and multi-file requirejs modules. @christopherthielen 👍 for the great package of yours.

from ui-router-extras.

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.