Releases: canjs/can-view-scope
Adding ability to add %special keys to templateContext
This makes it so that index
, key
, element
, event
, viewModel
, and arguments
will be non-observable if they are added to the templateContext
. This makes it so that this will be possible (once the index is added to the templateContext):
{{#each items}}
{{scope.index}}
{{/each}}
fixing nested properties in references scope
Preventing properties that start with "scope" from being read from the templateContext
Things like {{scope1}}
are now being read correctly again.
expanding refsScope to be accessible through scope.vars
This:
<h2>*foo: {{*foo}}</h2>
<label>
*foo: <input value:from="*foo" on:input:value:to="*foo">
</label>
can now be done like this:
<h2>scope.vars.foo: {{scope.vars.foo}}</h2>
<label>
scope.vars.foo: <input value:from="scope.vars.foo" on:input:value:to="scope.vars.foo">
</label>
Using *foo
and {{>*self}}
are also deprecated in favor of this new syntax.
{{./}} works correctly as an alias for {{.}}
Fix for v3.3.7, moving a test to only run in dev
An update to v3.3.7, to move a test to only run in dev mode.
Error when setting on an undefined property
#95 Errors when setting a value no a property with an undefined parent, such as scope.set('foo.bar', 'value');
where there is no foo
on scope
.
Fix the automatic creation of Refs scopes
In Scope.prototype.getRefs(), the ref scope that was created and appended as the parent of the scope chain, when a ref scope didn't already exist, was not actually a scope; it was a Scope.Refs object, which is meant to be the context object for a refs scope and not the Scope itself. This version fixes that creation to make it a Scope object.
This release also contains a cyclic dependency detection script that runs as part of the test process.