Skip to content

Commit

Permalink
Resolve tab issue
Browse files Browse the repository at this point in the history
  • Loading branch information
32penkin committed Feb 14, 2017
1 parent 6a843db commit 8553c10
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
28 changes: 14 additions & 14 deletions js/MainComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ import { ToDoItem } from './ToDoItem';

export class MainComponent {

constructor() {
this.elem = document.createElement('main');
this.myToDoList = new ToDoList();
this.myInputForm = new InputForm('toDos', this.myToDoList);
this.myFilterOfList = new FiltersOfList(this.myToDoList);
this.myFooterOfList = new FooterOfList('Press Enter to add todo');
}
constructor() {
this.elem = document.createElement('main');
this.myToDoList = new ToDoList();
this.myInputForm = new InputForm('toDos', this.myToDoList);
this.myFilterOfList = new FiltersOfList(this.myToDoList);
this.myFooterOfList = new FooterOfList('Press Enter to add todo');
}

render() {
this.elem.appendChild(this.myInputForm.render());
this.elem.appendChild(this.myToDoList.render());
this.elem.appendChild(this.myFilterOfList.render());
this.elem.appendChild(this.myFooterOfList.render());
return this.elem;
}
render() {
this.elem.appendChild(this.myInputForm.render());
this.elem.appendChild(this.myToDoList.render());
this.elem.appendChild(this.myFilterOfList.render());
this.elem.appendChild(this.myFooterOfList.render());
return this.elem;
}
}
2 changes: 1 addition & 1 deletion js/helpers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Handlebars from 'handlebars';
export function attachMainComponent(component) {
document.getElementsByTagName('body')[0].appendChild(component);
document.getElementsByTagName('body')[0].appendChild(component);
}

export const handlebarsTernHelper = Handlebars.registerHelper('tern', function (value, equal, value1, value2) {
Expand Down

0 comments on commit 8553c10

Please sign in to comment.