0
有沒有可能查詢由Viewchild裝飾的對象的DOM,就像我會用jQuery一樣?對jQuery做類似於用viewChild裝飾的對象的操作
我必須做下面的東西給孩子的DOM。
@ViewChild('someComponent') child: SomeComponent;
ngAfterViewInit() {
this.child.queryTheDomElementFor('some tag');
this.child.getDomElementThatContains('specific Content');
this.child.setCss(this.child.someNode, 'css rules');
}
SomeComponent類沒有那些jQuery方法。 – Lev
哪個jQuery方法?哪些組件 – Aravind
SomeComponent類沒有方法querySelectorAll等 – Lev