[英]How to access ViewChildren and ContentChildren of Component in ES5?
您需要在ng.core.Component的querys屬性中使用ng.core.ViewChildren。
這是示例:
var component = ng.core
.Component({
selector: 'comp',
template: '...',
(...)
queries: {
someProp: new ng.core.ViewChildren(someDirective)
}
})
.Class({
(...)
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.