Closed justinbmeyer closed 5 years ago
Related to https://github.com/canjs/can-stache/issues/528
I'd like to create a variable scope like:
var scope = new Scope({ rootProp: "ROOT" }).add({ variableProp: "VARIABLE" },{variable: true});
And then
scope.get("variableProp") //-> "VARIABLE"; scope.get("this.rootProp") //-> "ROOT";
this.key should skip all of these variables. key should look in these variables and then end with the first "context" variable it finds.
this.key
key
I feel like most of these variable scopes should have a SimpleMap as their context. This will allow variable re-assignment.
SimpleMap
It looks like this was implemented in https://github.com/canjs/can-view-scope/pull/182
Related to https://github.com/canjs/can-stache/issues/528
I'd like to create a variable scope like:
And then
this.key
should skip all of these variables.key
should look in these variables and then end with the first "context" variable it finds.I feel like most of these variable scopes should have a
SimpleMap
as their context. This will allow variable re-assignment.