fipamo/public/assets/scripts/dash/app/controllers/PostIndex.js

31 lines
649 B
JavaScript
Raw Normal View History

import PageEditor from "./PageEditor";
export default class PostIndex {
//--------------------------
// constructor
//--------------------------
constructor(page) {
this.currentPage = null;
this.choosePage(page);
this.start();
}
//--------------------------
// methods
//--------------------------
start() {}
choosePage(page) {
this.currentPage = "";
switch (page) {
case "edit":
case "add":
this.currentPage = new PageEditor();
break;
default:
//just chill
break;
}
}
//--------------------------
// event handlers
//--------------------------
}