{{#if}}
?
display: none
it shouldn’t initialize the second one
cached
to not create a new Map, it looks like it fixes the issue
cached._cid
, both are .map5
can.Map
as the cached property
var cachedMap = new can.Map({
item: {}
});
can.Component.extend({
tag: "navigation",
viewModel: {
cached: cachedMap
}
});
can.Component.extend({
tag: "navigation",
viewModel: {
define: {
cached: {
value: function() {
return {}
}
}
}
}
});