本文整理匯總了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);
}