Changelog
0.5.7
2014-09-11
Changelog
0.5.6
2014-08-31
<script>
for templates is an error{{yield}}
operator - see https://github.com/ractivejs/ractive/pull/1141line
and character
data for debugging inside live editors{{>item foo}}
ractive.animate()
are applied immediately, not on the next frameChangelog
0.5.5
2014-07-13
ractive.observe()
(#970)Changelog
0.5.2, 0.5.3, 0.5.4
2014-07-05
Changelog
0.5.2, 0.5.3, 0.5.4
2014-07-05
Changelog
0.5.2, 0.5.3, 0.5.4
2014-07-05
Changelog
0.5.0
2014-07-05
Code organisation
Breaking changes:
init: function(options)
is now strictly what was passed into the constructor, use this.option
to access configured value.data
with properties on prototype are no longer cloned when accessed. data
from "baseClass" is no longer deconstructed and copied.<script>
tag for specifying inline templates is not enforced.debug
now on defaults
, not constructornumber
or range
{{this.foo}}
in templates now means same thing as {{.foo}}
array.*
no longer send item.length
event on mutation changes{{else}}
support in both handlebars-style blocks and regular mustache conditional blocks, but is now a restricted keyword that cannot be used as a regular referenceOther new features
#if
, #with
, #each
, #unless
and corresponding @index
and @key
Ractive.prototype
- e.g. ractive.push('items', newItem)
. The return value is a Promise that fulfils when any transitions complete{{./foo}}
added as alias for {{.foo}}
~/
keypath specifier, eg {{~/foo}}
, for accessing root data context in keypathsractive.set
supports pattern observers, eg ractive.set('foo.*.bar')
on
, eg ractive.on( 'foo bar baz', handleFooBarOrBaz )
ractive.update(property)
updateModel
returns a Promise
Component.extend
is writable (can be extended)append
option can now take a target element, behavior same as ractive.insert
Ractive.defaults
and Component.defaults
ractive.reset()
will re-render if template or partial specified by a function changes its valueractive.resetTemplate()
method that re-renders with new templateractive.off()
returns instance making it chainableBug fixes:
0
,''
, false
, etc)foreignObject
correctly defaults to HTML namespacewindow
in the browserinput
and option
binding edge casesthis._super
safe if baseclass or it's method doesn't actually exist..
on keypaths do not throw errors and are removed for purposes of processing*
can be used as first part of observer keypathChangelog
0.4.0
2014-04-08
set()
, update()
, teardown()
, animate()
, merge()
, add()
, subtract()
, and toggle()
methods return a Promise that fulfils asynchronously when any resulting transitions have completedRactive.defaults
(and Component.defaults
, where Component = Ractive.extend(...)
)adaptors
option is now adapt
. It can be a string rather than an array if you're only using one adaptor{{foo[bar]}}
Ractive.Promise
(Promises/A+ compliant, a la ES6 Promises)css
option (disable with noCssTransform: true
)ractive.reset()
method allows you to replace an instance's data
objectupdate()
method if possible, otherwise by tearing down and reinitialising)isolated: true
window.Ractive
) is always exported, but Ractive.noConflict()
is provided to prevent clobbering existing Ractive
variableinit()
methods are only called once the component has entered the DOM{{/...}}
, where ...
can be any string other than the closing delimiterractive.observe(callback)
- i.e. with no keypath - observes everythingractive.observe('foo bar baz', callback)
will observe all three keypaths (passed to callback as third argument)ractive.toHTML()
ractive.off()
with no arguments removes all event listeners<option>{{foo}}</option>
works the same as <option value='{{foo}}'>{{foo}}</option>