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
    • can-view-parser
    • can-view-scope
      • types
        • Meta
      • static
        • Options
      • prototype
        • add
        • compute
        • get
        • peek
        • set
    • can-view-target
  • Legacy
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • CanJS
  • /
  • Infrastructure
  • /
  • can-view-scope
  • /
  • compute
  • / On this page
    • compute

      function
      • source

      scope.compute(key [, options])

      Get a compute that is two-way bound to the key value in the scope. These computes can be optimized beyond wrapping a compute around a call to get.

      scope.compute("first.name");
      

      Parameters

      1. key {key}:

        A dot seperated path. Use "." if you have a property name that includes a dot.

      Returns

      {compute(newVal)}:

      A compute.

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