Skip to content

Commit

Permalink
🔧
Browse files Browse the repository at this point in the history
  • Loading branch information
kobezzza committed Sep 19, 2018
1 parent e95484f commit f1e2a7e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion demo/helloworld.html
Expand Up @@ -21,7 +21,7 @@
? ctx.helloWorld = fn
- return fn

- template ['helloWorld'](name = 'world')
- template helloWorld(name = 'world')
< .hello
Hello {name}!

Expand Down
2 changes: 2 additions & 0 deletions src/directives/template.js
Expand Up @@ -263,6 +263,8 @@ import {
this.parentTplName = this.normalizeBlockName(parentTplName);

if ($cache[parentTplName] == null) {
console.log(parentTplName, declParentTplName, $cache);

if (!this.renderAs || this.renderAs === 'template') {
return this.error(`the specified template "${declParentTplName}" for inheritance is not defined`);
}
Expand Down
3 changes: 1 addition & 2 deletions src/live/filters.js
Expand Up @@ -698,8 +698,7 @@ Filters['super'] = function (val, scope, init) {
console.log(init);

if (init) {
console.log(121);
return p.slice(-1)[0];
return p[nm].slice(-2)[0];
}

val = val + Math.random().toString().slice(2);
Expand Down
7 changes: 6 additions & 1 deletion src/parser/name.js
Expand Up @@ -141,8 +141,13 @@ Parser.prototype.getBlockName = function (name, opt_parseLiteralScope) {

if (custom) {
console.log(111, el);
console.log(222, this.returnEvalVal(el));
try {
console.log(222, this.returnEvalVal(el));
} catch (e) {
console.log(e);
}
res += ws`['${applyDefEscape(this.returnEvalVal(el))}']`;
console.log(333, res);
continue;
}

Expand Down

0 comments on commit f1e2a7e

Please sign in to comment.