本文整理汇总了TypeScript中app/components/StateService.StateService类的典型用法代码示例。如果您正苦于以下问题:TypeScript StateService类的具体用法?TypeScript StateService怎么用?TypeScript StateService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了StateService类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
loadExample2() {
this.stateService.loadDatabase(ExampleData2());
}
示例2: selectMenuItem
selectMenuItem(id: number) {
this.stateService.setByPath(['mainMenuSelectedItemId'], id);
}
示例3: loadFile
loadFile() {
var fname = dialog.showOpenDialog();
console.log(fname[0]);
var data = fs.readFileSync(fname[0]);
this.stateService.loadDatabase(JSON.parse(data));
}
示例4: Project
addProject() {
this.stateService.addProject(
new Project({name: this.newProjectName}));
this.newProjectName = '';
}
示例5: remove
remove() {
this.stateService.removeTag(this.path);
}
示例6: add
add() {
this.stateService.addSubTag(this.path);
}
示例7: saveEdit
saveEdit() {
this.editing = false;
this.stateService.setTagName(this.path, this.editedName);
}
示例8: saveEdit
saveEdit() {
this.editing = false;
this.stateService.setProjectName(this.path, this.editedProjectName);
}