本文整理汇总了TypeScript中angular2/core.QueryList类的典型用法代码示例。如果您正苦于以下问题:TypeScript QueryList类的具体用法?TypeScript QueryList怎么用?TypeScript QueryList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了QueryList类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: noteOn
noteOn(note: any) {
console.log('simple synth play note called ' + note);
let volume = 1 / this.oscComponents.toArray().length;
for (let osc of this.oscComponents.toArray()) {
osc.start(note, volume, this.master);
}
}
开发者ID:pitrackster,项目名称:mini-studio-app,代码行数:8,代码来源:simple-synth.ts
示例2: ngAfterContentInit
ngAfterContentInit() {
let localTabsRef = this.tabs.toArray();
for (let i = 0; i < localTabsRef.length; i++) {
localTabsRef[i].id = 'tab-' + i;
localTabsRef[i].headingId = 'heading-' + localTabsRef[i].id;
localTabsRef[i].largeDevice = this.largeDevice;
}
let activeTabs = this.tabs.filter((tab) => tab.isActive);
// if there is no active tab set, activate the first
if (activeTabs.length === 0) {
this.selectTab(this.tabs.first);
}
}
开发者ID:arandehkharghani,项目名称:angular2-tabs,代码行数:15,代码来源:tabs.component.ts
示例3: ngAfterContentInit
ngAfterContentInit() {
let activeTabs = this.tabs.filter((tab) => tab.active);
if (activeTabs.length === 0) {
this.selectTab(this.tabs.first);
}
}
开发者ID:CedarLogic,项目名称:WebJobsPortal,代码行数:7,代码来源:tabs.component.ts
示例4: noteOff
noteOff(freq){
console.log('simple synth note off called ');
for (let osc of this.oscComponents.toArray()) {
console.log('simple synth note off stop osc ');
osc.stop(freq, this.master);
}
}
开发者ID:pitrackster,项目名称:mini-studio-app,代码行数:7,代码来源:simple-synth.ts
示例5: selectTab
selectTab(tab: Tab) {
// deactivate all tabs
this.tabs.toArray().forEach( tab1 => tab1.active = false);
// activate the tab the user has clicked on.
tab.active = true;
}
开发者ID:codycoggins,项目名称:angular2-starter-cody,代码行数:7,代码来源:tabs.ts
示例6: _deactivateAllTabs
selectTab(tab: ChartOfAccountsTab) {
_deactivateAllTabs(this.tabs.toArray());
tab.active = true;
function _deactivateAllTabs(tabs: ChartOfAccountsTab[]) {
tabs.forEach((tab)=>tab.active = false);
}
}
开发者ID:hgminerva,项目名称:Easyfisv2-ui,代码行数:8,代码来源:chartOfAccountsTabs.ts
示例7: ngAfterContentInit
// contentChildren are set
ngAfterContentInit() {
// get all active tabs
let activeTabs = this.tabs.filter((tab)=>tab.active);
// if there is no active tab set, activate the first
if(activeTabs.length === 0) {
this.selectTab(this.tabs.first);
}
}
开发者ID:sbommanaboina1,项目名称:FirstTest,代码行数:9,代码来源:tabs.ts
示例8: _deactivateAllTabs
selectTab(tab: ProfileTab) {
_deactivateAllTabs(this.tabs.toArray());
tab.active = true;
function _deactivateAllTabs(tabs: ProfileTab[]) {
tabs.forEach((tab)=>tab.active = false);
}
}
开发者ID:hgminerva,项目名称:Easyfisv2-ui,代码行数:8,代码来源:profileTabs.ts
示例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;
}
开发者ID:Floodlight-Studios,项目名称:studioDashboard,代码行数:8,代码来源:MiniTabs.ts
示例10: selectTab
selectTab(tab: TabComponent) {
// deactivate all tabs
for (let tab of this.tabs.toArray()) {
tab.isActive = false;
}
// activate the tab the user has clicked on.
tab.isActive = true;
}
开发者ID:arandehkharghani,项目名称:angular2-tabs,代码行数:9,代码来源:tabs.component.ts
注:本文中的angular2/core.QueryList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论