本文整理汇总了TypeScript中@angular/core.QueryList.find方法的典型用法代码示例。如果您正苦于以下问题:TypeScript QueryList.find方法的具体用法?TypeScript QueryList.find怎么用?TypeScript QueryList.find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@angular/core.QueryList
的用法示例。
在下文中一共展示了QueryList.find方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: highlightItem
private highlightItem(item:CalendarItem | undefined):void {
if (item) {
this._renderedItems.forEach(i => i.hasFocus = false);
const rendered = this._renderedItems.find(ri => ri.item === item);
if (rendered && !rendered.hasFocus) {
rendered.hasFocus = true;
rendered.changeDetector.detectChanges();
}
this._highlightedItem = item;
}
}
示例2: highlightMostWinningTeam
private highlightMostWinningTeam() {
var highlightIndex = 0;
var currentIndex = 0;
var highestWinValue = 0;
this.winCells.forEach(wc => {
wc.nativeElement.parentNode.style.backgroundColor = '';
wc.nativeElement.parentNode.style.color = '';
var currentWins = Number(wc.nativeElement.innerText);
if(currentWins > highestWinValue)
{
highlightIndex = currentIndex;
highestWinValue = currentWins;
}
currentIndex++;
});
this.winCells.find((item, index) => index == highlightIndex).nativeElement.parentNode.style.backgroundColor = 'red';
this.winCells.find((item, index) => index == highlightIndex).nativeElement.parentNode.style.color = 'white';
}
示例3: Error
.forEach(tH => {
const content = this._tabContents.find(tC => tC.id === tH.id);
if (!content) {
// Error if an associated tab content cannot be found for the given header.
throw new Error("A [suiTabHeader] must have a related [suiTabContent].");
}
// Create a new tab instance for this header & content combo.
const tab = new Tab(tH, content);
// Subscribe to any external changes in the tab header's active state. External changes are triggered by user input.
tab.header.isActiveExternalChange.subscribe(() => this.onHeaderActiveChanged(tab));
// Add the new instance to the list of tabs.
this.tabs.push(tab);
});
示例4: ngAfterViewInit
/**
* After view init
*/
ngAfterViewInit(): void
{
this._chatViewScrollbar = this._fusePerfectScrollbarDirectives.find((directive) => {
return directive.elementRef.nativeElement.id === 'messages';
});
}
示例5: getEditableTab
getEditableTab(): TabNewComponent {
return this.tabs.find((tab: TabNewComponent) => tab.editMode);
}
示例6:
this.tabs = this.tabs.filter(t => !!this._tabHeaders.find(tH => tH === t.header));
示例7: ngAfterViewInit
/**
* After view init
*/
ngAfterViewInit(): void
{
this.courseStepContent = this.fuseScrollbarDirectives.find((fuseScrollbarDirective) => {
return fuseScrollbarDirective.elementRef.nativeElement.id === 'course-step-content';
});
}