I want to create a dynamic tabs loader using angular 2 material this is the syntax which I want to supportУгловые 2 динамические вкладки погрузчика
<generic-tabs [tabs]="tabs" tabVisibleField="name">
<test-cmp [tabContent] testData="hello"></test-cmp>
<test-cmp [tabContent] testData="hello from cmp one"></test-cmp>
<test-cmp [tabContent] testData="hello from cmp 2"></test-cmp></generic-tabs>
And inside the component I want to render tabs using material design and bind to each tab a component which contains tabContent This is the template for generic tabs
<md-tab-group *ngIf="componentsReferences && componentsReferences.length > 0">
<md-tab *ngFor="let componentRef of componentsReferences; let i=index" (click)="onTabClick($event, i)">
<template md-tab-label>{{getDisplayField(i)}}</template>
<template md-tab-content>
//inject the component for this tab
</template>
</md-tab>
</md-tab-group>
What I don't know is how to select all the component which are are inside the generic-tabs tag and make angular to create them
это то, что я пытался сделать до сих пор, но если бы не работал. На rc-06 я получаю create embededView не является функцией https://plnkr.co/edit/TdLZghoOstRqcItmrJg3?p=preview – Nicu
Это ошибка, которую я получаю на rc-0.6 для чего-то подобного с этим plunk. browser_adapter.ts: 82 ORIGINAL ИСКЛЮЧЕНИЕ: TypeError: не удается прочитать свойство 'createEmbeddedView' в нуль – Nicu
browser_adapter.ts: 82 TypeError: не удается прочитать свойство 'createEmbeddedView' нулевых на ViewContainerRef_.createEmbeddedView (core.umd.js: 8344) в ViewContainerRef_.createEmbeddedView (ядро .umd.js: 8344) на NgTemplateOutlet.ngOnChanges (common.umd.js: 1236) на DebugAppView._View_GenericTabsComponent5.detectChangesInternal (GenericTabsComponent.ngfactory.js: 369) в DebugAppView.AppView.detectChanges (core.umd.js : 12586) на Дебе ugAppView.detectChanges (core.umd.js: 12691) – Nicu