mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
make #with work
This commit is contained in:
@@ -62,3 +62,10 @@ UI.Unless = Component.extend({
|
||||
buf.write(condition ? self.elseContent : self.content);
|
||||
}
|
||||
});
|
||||
|
||||
UI.With = Component.extend({
|
||||
kind: 'With',
|
||||
render: function (buf) {
|
||||
buf.write(this.content);
|
||||
}
|
||||
});
|
||||
@@ -1,6 +1,8 @@
|
||||
|
||||
var global = (function () { return this; })();
|
||||
|
||||
// XXXXXXXX take out the "look up the tree" logic for Stage I
|
||||
|
||||
_extend(UI.Component, {
|
||||
// _dontCall is for internal use only.
|
||||
//
|
||||
@@ -26,7 +28,7 @@ _extend(UI.Component, {
|
||||
} else if (id === 'unless') {
|
||||
result = UI.Unless;
|
||||
} else if (id === 'with') {
|
||||
result = Component;
|
||||
result = UI.With;
|
||||
} else if (/^[A-Z]/.test(id) && (id in global)) {
|
||||
// Only look for a global identifier if `id` is
|
||||
// capitalized. This avoids have `{{name}}` mean
|
||||
|
||||
Reference in New Issue
Block a user