DoneJS StealJS jQuery ++ FuncUnit DocumentJS
3.0.0
2.3.27

 

  • Github
  • Twitter
  • Chat
  • Forum
  • Guides
  • Core
  • Ecosystem
  • Infrastructure
    • can-construct
    • can-control
    • can-event
    • can-event/async/async
    • can-event/batch/batch
    • can-observation
    • can-simple-map
    • can-util
    • can-view-callbacks
    • can-view-live
    • can-view-model
    • can-view-nodelist
      • types
        • NodeList
      • methods
        • first
        • last
        • nestList
        • nestReplacements
        • register
        • unregister
        • unregisterChildren
        • update
    • can-view-parser
    • can-view-scope
    • can-view-target
  • Legacy
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • CanJS
  • /
  • Infrastructure
  • /
  • can-view-nodelist
  • / On this page
    • can-view-nodelist

      module

      Adds nesting of text nodes can.view.nodeLists are used to make sure "directly nested" live-binding sections update content correctly.

      Consider the following template:

      <div>
      {{#if items.length}}
          Items:
              {{#items}}
                  <label></label>
              {{/items}}
      {{/if}}
      </div>
      

      The {{#if}} and {{#items}} seconds are "directly nested" because they share the same <div> parent element.

      If {{#items}} changes the DOM by adding more <labels>, {{#if}} needs to know about the <labels> to remove them if {{#if}} is re-rendered. {{#if}} would be re-rendered, for example, if all items were removed.

      • npm package badge
      • Star
      • source

      Object

      CanJS is part of DoneJS. Created and maintained by the core DoneJS team and Bitovi. Currently 3.0.0.