From d42fa0786346969d05c7664d57da2e5f615d0bb6 Mon Sep 17 00:00:00 2001 From: Tobias Bosch Date: Fri, 26 Sep 2014 17:38:38 -0700 Subject: [PATCH] fix(examples): make todo example run again --- modules/examples/src/todo/app.js | 3 +-- modules/examples/src/todo/index.html | 6 +++--- modules/examples/src/todo/main.es5 | 1 + modules/examples/src/todo/main.js | 1 - modules/test_lib/src/test_lib.es6 | 8 +++++++- 5 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 modules/examples/src/todo/main.es5 delete mode 100644 modules/examples/src/todo/main.js diff --git a/modules/examples/src/todo/app.js b/modules/examples/src/todo/app.js index 626ba7d06b..a8a8c0d7fc 100644 --- a/modules/examples/src/todo/app.js +++ b/modules/examples/src/todo/app.js @@ -1,6 +1,5 @@ -import {DOM} from './dom'; +import {DOM} from 'facade/dom'; export class App { - @field('input:Element') constructor() { this.input = null; this.list = null; diff --git a/modules/examples/src/todo/index.html b/modules/examples/src/todo/index.html index 62023f7dd5..467b4caa94 100644 --- a/modules/examples/src/todo/index.html +++ b/modules/examples/src/todo/index.html @@ -9,12 +9,12 @@ <% } else { %> - + - + - + <% } %> \ No newline at end of file diff --git a/modules/examples/src/todo/main.es5 b/modules/examples/src/todo/main.es5 new file mode 100644 index 0000000000..dc0a77604c --- /dev/null +++ b/modules/examples/src/todo/main.es5 @@ -0,0 +1 @@ +new (System.get("examples/todo/app").App)().run(); diff --git a/modules/examples/src/todo/main.js b/modules/examples/src/todo/main.js deleted file mode 100644 index 4cfc7e3fa9..0000000000 --- a/modules/examples/src/todo/main.js +++ /dev/null @@ -1 +0,0 @@ -new (System.get("examples/src/todo/app").App)().run(); diff --git a/modules/test_lib/src/test_lib.es6 b/modules/test_lib/src/test_lib.es6 index cfe98c6c19..72d70ed3c2 100644 --- a/modules/test_lib/src/test_lib.es6 +++ b/modules/test_lib/src/test_lib.es6 @@ -5,4 +5,10 @@ export var afterEach = window.afterEach; export var expect = window.expect; // To make testing consistent between dart and js -window.print = window.dump || window.console.log; +window.print = function(msg) { + if (window.dump) { + window.dump(msg); + } else { + window.console.log(msg); + } +};