canjs
publish model works?can-stache
there is master branch for upstream version and 3.x
branch for CanJS@3
as far as I got.3.x
versions in GitHub
(and NPM
requires them as I know), so lets say we need to make change for CanJS@3
(and change version) when CanJS@5
already exists, how this handled ?CanJS@3
and CanJS@5
for some time, and currently there is only master
with tags
for CanJS@3
, so was thinking about same approach.
can@3
and its sub-packages: http://v3.canjs.com/doc/guides/contribute.html
$ git tag | grep v3.
v3.0.0
...
v3.14.7
v3.14.8
v3.14.9
v3.15.0
v3.15.1
...
v3.7.1
v3.7.2
v3.7.3
v3.8.0
v3.9.0
Hey guys. Not sure if I've encountered a bug. I'm using the let
context, but if I have several of these in a row, it seems to put chrome in an endless cpu loop:
{{let field = ...}}
...
{{let field = ...}}
.... etc
The point is, there's multiple calls to let field = something else and it causes lots of issues.
with
is the best choice, but it appears that with is going to be removed eventually?
field
every time?
field
, so I need the variable field to be available in the stache template. I'm rendering a list of these fields like so: {{let field = fieldsMap.fieldName}}
{{>field.editComponent}}
{{let field = fieldsMap.otherFieldName}}
{{>field.editComponent}}
stache(`<${tag} properties:from="field"
object:from="dirtyObject"
value:bind="dirtyObject[field.name]"
error:bind="validationErrors[field.name]"
on:fieldchange="checkField(scope.arguments)"></${tag}>`);
LetContext
is at the template level
let field = ..something else
it won't reassign field
?
editComponent
template works
field
in the template
field
{{let field="abc"}}
<p>{{field}}</p>
{{let field="def"}}
<div>{{field}}</div>
{{field="def"}}
is possible for reassigning
{{let field="abc"}}
<p>{{field}}</p>
{{/let}}<!-- field is no longer referenced -->
{{let field="def"}}
<div>{{field}}</div>
{{/let}}
{{#let}}
is currently supported ... let (haha!) me check
with
did?
../
letHelper
would need to detect if it was called with #
(by checking if it was passed an options
). If it was, it would call options.fn()
with a new LetContext
options.fn
{{fieldsMap.number.editComponent(field=fieldsMap.number)}}
does render the field partial I want. BUT it doesn't appear to be binding correctly. The only scope that gets passed is the field
dirtyObject
, object
, and other props that my partial needs?
editComponent(this=mixin(this, field=fieldsMap.number))
let
scope in this scenario?
makeScope(field){
return new Scope( whatYouWant_this_toBe ).addLetContext( {variable1: VALUE} )
}