Skip to content

Restore all of legacy can.view

Latest

Choose a tag to compare

@bmomberger-bitovi bmomberger-bitovi released this 12 Apr 22:16
· 9 commits to master since this release

To assist in the upgrade path for CanJS 2.x projects, especially ones using EJS, this 1.0.0 release of can-legacy-view-helpers provides all of the functionality of the legacy can.view module, including:

  • a legacy Deferred object that works like jQuery.Deferred prior to jQuery 3.1, including synchronous resolution.
  • can.view(), which takes a renderer or path to a template and a context object, and returns the rendered view as a fragment with bindings resolved.
  • can.view.render(), which takes a renderer or path to a template and a context object, and returns the rendered view as a string without bindings resolved.
  • can.view.fragment(), which resolves any bindings on a string view created with can.view.render() and returns the result as a document fragment.

See #37 for the majority of code changes since version 0.6.