- Add ref binding
- Check that object is an array before using it.
- Fix issue when using vm names
- Arrays keep being reactive after .reset()
- Fix .extend when given a blank object
- Inherit properties from context so you don't have to write
Template.test.viewmodel( function(data) { return data; } )
- Properties inherited from the context are reactive and will change if Blaze changes the context.
- .parent() uses parent template only if it has a view model
- Fix issue with onUrl for repeating templates
- Autoruns can now be declared with an array of fuctions.
- Autoruns are now executed on rendered before bind.
- view model autoruns are now executed after the view model is created.
- .children() is now reactive
- .children() now accepts a bool predicate function or a string with the desired template name
- Allow binding directly to parent properties (
data-bind="value: parent.name"
)
- Simplify input value binding
- Fix backspace on empty input for some browsers.
- Keypress disregards non-characters when updating the underlying value
- Trigger a change when the value bind changes programmatically.
- Fix select element (multiple) not maintaining selections when an element is added to the array.
- Show console messages only when in development.
- .extend now updates values if the view model already has the properties.
- value bind now passes the input value to a bound function instead of the jquery event.
- Fix keypress event on input value bind
- Fix url state save for templates with dots.
- ViewModel is now able to save the state on the URL. To do so add a
onUrl
property to your viewmodels with either a string or array of strings with the names of the properties you want on the URL. You must give the view model a unique name though.
- Prevent value bind from updating on the next JS cycle when the value doesn't have to be delayed.
- Add
beforeBind
andafterBind
to be used instead ofonRendered
(onRendered still works but before/after bind is clearer)
- If ViewModel.byId doesn't find a view model with the given id, it will return a view model with that template (as long as there's only one).
- Put onRendered functions on the animation frame so you don't see a flicker if you define your elements with one style and then change it via the view model's default value.
- Add template.elementBind method to retrieve the bind on an element. Very useful for testing.
- Add toggle binding for toggling a boolean on click.
- parent is set onCreated (when possible)
- Fix enabled/disabled binding for textarea
- Add the following attributes as binds: 'src', 'href', 'readonly'
- Prevent event and helper hooks from being added twice.
- blaze_events and blaze_helpers now accept either an object or a function
- Don't throw an error when calling .parent() of a vm that doesn't have one.
- Check the view model object before extending from it.
- Fix dispose when template doesn't have a parent.
-
Add viewmodel.children() method. This is the counterpart of .parent()
-
'children' is now a reserved word, just like 'parent'.
-
Add a history file! (it was about time)
-
Monkey patch Blaze so Blaze.View.prototype.onViewReady uses setTimeout instead of Tracker.autoFlush. This is to avoid a situation where a parent will execute the onRendered callback before a child can do so, even though the child already rendered.
-
Use ViewModel reserved words "as is" when extending a view model.