diff --git a/app/controllers/application.js b/app/controllers/application.js new file mode 100644 index 0000000..02b665a --- /dev/null +++ b/app/controllers/application.js @@ -0,0 +1,6 @@ +import Controller from '@ember/controller'; +import { tracked } from '@glimmer/tracking'; + +export default class ApplicationController extends Controller { + @tracked taskList = ['Task 1', 'Task 2', 'Task 3']; +} diff --git a/app/templates/application.hbs b/app/templates/application.hbs index d41a0ba..a454f42 100644 --- a/app/templates/application.hbs +++ b/app/templates/application.hbs @@ -1,7 +1,11 @@ {{page-title "TodoList"}} -{{! The following component displays Ember's default welcome message. }} - -{{! Feel free to remove this! }} +

Todo List

+ +{{#each this.taskList as |task|}} +
+ {{task}} +
+{{/each}} {{outlet}} \ No newline at end of file diff --git a/tests/unit/controllers/application-test.js b/tests/unit/controllers/application-test.js new file mode 100644 index 0000000..2ed4742 --- /dev/null +++ b/tests/unit/controllers/application-test.js @@ -0,0 +1,12 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'todo-list/tests/helpers'; + +module('Unit | Controller | application', function (hooks) { + setupTest(hooks); + + // TODO: Replace this with your real tests. + test('it exists', function (assert) { + let controller = this.owner.lookup('controller:application'); + assert.ok(controller); + }); +});