Get reference of the template inside your component class using ViewChild or ViewChildren to change the behavior and appearance of the element. Watch is this tutorial for more details.
Hi Saikat.. Nice tutorial..For first few mins, I was under impression that tutorial going too slow but you are good at explaining things. I enjoyed it and received what I was looking for..Looking for more videos from you... Thank you so much, Keep it up..:)
This is goooood!!! I am real stingy with compliments. So, if I say this is good (with multiple 'O's ) it mean your tutorial is really good! Thank you for making this Saikat.
Sir Great!!!, after use this visual, atleat I'm able to work on @ViewChild/Children, ElementRef/TemplateRef/NativeElement etc. Very clear to understand, I appreciate your topic, Again Thanks a Lot.
Sure Ravi. I have plan for next video tutorial on moduler design practice and lazy loading, but unable to complete due to huge work pressure. For sure I will upload tutorial this month.
Hi, i have a question .. How do i manipulate the dom within the *ngIf directive using the viewchild... i tried and got nativeElement undefined .. Is there a way i can detect if a certain dom had been rendered after ngOnInit so that i can fire up a method once it is rendered, because some of my dom will only rendered after a data is received by backend (observable) ... Thank you
I was trying to add two numbers in angular its working fine when i use button but i want to perform addition on keyup and the sum should be passed to child component without using any button or click event through function in app.component.ts Please tell how to do this. Thanks in Advance..
Hi Saikat, we have dynamic tabs, in each tab we have s embedded and we have the hidden form in angular to post data to ...if I use ViewChild or ViewChildren I m getting only current tab form data only by using nativeelement. But when it gets submitted it is getting posted to first tab only..Help on this item urgently
Hi saikat. i'm facing an issue in angular 7. A little help would be highly appreciated. Here's my problem : I want to display a component independently, when that component is called, without showing the root component(in my case, the app.component.html). What is the way to do that ? thanks a lot :)
@@SaikatsTutorial Thanks for the reply. I solved the problem, though. I, basically had to render a component independently. But due to some restrictions, I was facing some problems. It's fixed now :D Thanks again.
Using angular 4.1 In .html file: , In .ts file import { Component, OnInit, ViewChild, ElementRef, AfterViewInit } from '@angular/core'; @ViewChild('benchBotTab') benchBotTab: ElementRef; ngAfterViewInit() { console.log(`MyViewChild: ${this.benchBotTab.nativeElement}`); } but I'm getting an error like Runtime Error Uncaught (in promise): TypeError: this.benchBotTab is undefined