我在控制器中有一个不同组件的列表,我需要渲染它们,如何?
落镖:
@NgController(
selector: '[my-controller]',
publishAs: 'ctrl'
)
class MyController {
List components;
MyController() {
components = new List();
components.add(new ComponentType1());
components.add(new ComponentType2());
}
}
HTML:
<div my-controller>
<div ng-repeat="component in ctrl.components">
<!-- How render the component here? -->
</div>
</div>