Giter Site home page Giter Site logo

Comments (7)

mxriverlynn avatar mxriverlynn commented on May 4, 2024

I'm hoping it's just the example. :) We'll see. If not, I'll get it fixed in the lib.

from backbone.marionette.

hoffmanc avatar hoffmanc commented on May 4, 2024

Cool. Thanks for the quick response.

from backbone.marionette.

mxriverlynn avatar mxriverlynn commented on May 4, 2024

Ok, I mostly solved this... but it ends up producing an empty <ul></ul> at the lowest level <li> items

http://jsfiddle.net/derickbailey/xX9X3/

I can solve this by introducing a better toJSON method on my models, and then doing a check for the existence of child nodes within the template, to determine wether or not I should add the child <ul>. But I'll leave the solution as is for now, and will update the blog post sometime soon.

If you have any other suggestions on how to make this cleaner, feel free to share. Please. :)

from backbone.marionette.

hoffmanc avatar hoffmanc commented on May 4, 2024

I believe this does what you ask:

http://jsfiddle.net/hoffmanc/NH9J6/

Thanks for thinking through the hard part!

from backbone.marionette.

mxriverlynn avatar mxriverlynn commented on May 4, 2024

keep the logic out of the view. very nice. :)

from backbone.marionette.

mxriverlynn avatar mxriverlynn commented on May 4, 2024

I updated the blog post to note the problem you found, and both of the solution gists that we created. Thanks for noticing this, by the way. :)

from backbone.marionette.

hoffmanc avatar hoffmanc commented on May 4, 2024

Sure, thanks for including me in the article; not necessary, but appreciated.

from backbone.marionette.

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.