File: text.coffee

Defined in: template

Method Summary

Method Details

? Gunther.Template.prototype.text(text) Source

Public

Add text to the current element

This will create a text node and append it to the current element

Parameters:

  • (String) textString the text to add

? Gunther.Template.prototype.boundText(args...) Source

Bind a text node to a model's property

Parameters:

  • model{Backbone.Model} to bind on
  • (String) propertyString or Array of properties to bind on
  • generator(optional) method that generates the value after a change, when omitted, the value of the changed property is used

? Gunther.Template.prototype.spacedText(text) Source

Add text, with spaces on either side

{Gunther.Template::text} adds its text node without whitespace surrounding it, which is sometimes not desired for stylistic reasons. This method will add the text surrounded by a space on either side.

Parameters:

  • (String) textString Text to add