Top "Viewchild" questions

ViewChild is a decorator for Angular component variables, which allow to bind a template element.

Dynamically add Component in angular 2/4

How can I add component dynamically? toolbar.component.ts: @Component({ selector: 'app-toolbar', template: '<button>Add Text component&…

angular components angular-services viewchild
viewchild input property not updated when needed angular 2

I have been looking for some reason of this behavior, the value of a Input() property in a child component …

angular angular2-components viewchild
How to create @ViewChild temporary variable in a method in Angular 2?

I', trying to add a html control dynamically to div and after creating the control I would like to perform …

angular typescript viewchild
@Viewchild can not see matSort

In my Angular application, my @ViewChild instance is failing to fill HTL matSort. mycomponent.ts: import { MatSort } from '@angular/…

angular typescript datatables material-design viewchild
Angular 6 nested ViewChild inside ng-template is null

We are using a modal (ng-bootstrap's one) in our application. That modal looks like: <ng-template #modal let-modal> <…

javascript angular ng-bootstrap viewchild
angular 2 - How to get HTMLElement / ElementRef of child component using template reference variable?

I'm trying to get element of child component using ViewChild but can't find a way to achieve this. Let's say …

angular dom autoscroll viewchild
Angular(2/4) modalService.close() is not working

This is my code: import { NgbModal } from '@ng-bootstrap/ng-bootstrap';` constructor(private http: Http, private route: ActivatedRoute,private router: Router, …

angular bootstrap-modal viewchild
Ionic 2: How to call parent page function from Popover component

I have a page component with a button that opens a PopoverController. According to the Ionic Docs, popovers need another …

ionic-framework ionic2 viewchild ionic-popover
Expression has changed error on Opening a Modal Popup inside a component

I have a parent component and i am passing some HTML from it to a child common component using @ViewChild(). …

angular modal-dialog bootstrap-modal viewchild