本文整理汇总了TypeScript中@angular/core.QueryList.toArray方法的典型用法代码示例。如果您正苦于以下问题:TypeScript QueryList.toArray方法的具体用法?TypeScript QueryList.toArray怎么用?TypeScript QueryList.toArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@angular/core.QueryList
的用法示例。
在下文中一共展示了QueryList.toArray方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: saveAll
saveAll() {
var allInputs: GenericPropertyEditorComponent[] = [];
allInputs = allInputs.concat(
this.audioPropertyInputs.toArray(),
this.imagePropertyInputs.toArray(),
this.textPropertyInputs.toArray()
);
allInputs.forEach((input) => {
input.save();
});
}
示例2: selectTab
selectTab(tab: TabComponent) {
// deactivate all tabs
this.tabs.toArray().forEach(tab => tab.active = false);
// activate the tab the user has clicked on.
tab.active = true;
}
示例3: findService
private findService(id:string):ServiceDirective {
return this.services.toArray().find(service => {
if (service.id === id) {
return !!service;
}
});
}
示例4: loadPages
private loadPages() {
this.pages = this.contentPages.toArray();
for (let i = 0; i < this.pages.length; i++) {
this.pages[i].setParentPanel(this);
}
}
示例5: findLamp
private findLamp(id:string):LampDirective {
return this.lamps.toArray().find(lamp => {
if (lamp.id === id) {
return !!lamp;
}
});
}
示例6: selectCard
selectCard(card: EmploymentCard){
// deactivate all tabs
this.cards.toArray().forEach(card => card.active = false);
// activate the tab the user has clicked on.
card.active = true;
}
示例7: selectTab
selectTab(tab: TabComponent){
// deactivate all tabs
this.tabs.toArray().forEach(tab => tab.active = false);
// activate current tab
tab.active = true;
}
示例8: init
init() {
this.items = this.contentItems.toArray();
const length = this.contentItems.length;
for (let i = 0; i < length; i++) {
this.items[i].setParent(this);
}
}
示例9: selectTab
selectTab(tab: Minitab, event?:MouseEvent){
// deactivate all tabs
event ? event.preventDefault() : null;
this.tabs.toArray().forEach(tab => tab.active = false);
// activate the tab the user has clicked on.
tab.active = true;
}
示例10: onDimensionsChanged
// @Override
onDimensionsChanged(bounds: Size, viewport: Size) {
const directives = [
this.canvasContainer,
this.canvasLayers,
this.canvasOverlay,
...this.canvasRulers.toArray(),
];
directives.forEach(d => d.setDimensions(bounds, viewport));
}