Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Commit

Permalink
Step 9: convert sub-controllers to TS.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskrycho committed Mar 16, 2019
1 parent 693437c commit d6b110b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
6 changes: 0 additions & 6 deletions app/controllers/active.js

This file was deleted.

7 changes: 7 additions & 0 deletions app/controllers/active.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Controller from "@ember/controller";
import { filterBy } from "@ember-decorators/object/computed";
import { Todo } from "todomvc/services/repo";

export default class ActiveController extends Controller {
@filterBy("model", "completed", false) todos!: Todo[];
}
6 changes: 0 additions & 6 deletions app/controllers/completed.js

This file was deleted.

8 changes: 8 additions & 0 deletions app/controllers/completed.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import Controller from "@ember/controller";
import { filterBy } from "@ember-decorators/object/computed";

import { Todo } from "todomvc/services/repo";

export default class CompletedController extends Controller {
@filterBy("model", "completed", true) todos!: Todo[];
}

0 comments on commit d6b110b

Please sign in to comment.