Can not see shadow-root
Closed this issue · 1 comments
casvil commented
Hello, I am doing (already bought) the pro course in Ultimate Angular and even that it works (it applies the placeholder, sets the 'email' class and focuses the input, I can't see the shadow-root element in the console.
ngAfterViewInit() {
this.renderer.setElementAttribute(this.email.nativeElement, 'placeholder', 'Enter your email address');
this.renderer.setElementClass(this.email.nativeElement, 'email', true);
this.renderer.invokeElementMethod(this.email.nativeElement, 'focus');
// this.email.nativeElement.setAttribute('placeholder', 'Enter your email address');
// this.email.nativeElement.classList.add('email');
// this.email.nativeElement.focus();
if (this.message) {
// setTimeout(() => {
this.message.forEach((message) => {
message.days = 30;
});
this.cd.detectChanges();
// })
}
}
Thanks
toddmotto commented
Hey! You can enable this view in Dev Tools :D open your settings >
preferences > Show user agent shadow DOM :)
…On 23 November 2017 at 14:01, casvil ***@***.***> wrote:
Hello, I am doing (already bought) the pro course in Ultimate Angular and
even that it works (it applies the placeholder, sets the 'email' class and
focus the input, I can't see the shadow-root element in the console.
ngAfterViewInit() {
this.renderer.setElementAttribute(this.email.nativeElement, 'placeholder', 'Enter your email address');
this.renderer.setElementClass(this.email.nativeElement, 'email', true);
this.renderer.invokeElementMethod(this.email.nativeElement, 'focus');
// this.email.nativeElement.setAttribute('placeholder', 'Enter your email address'); // this.email.nativeElement.classList.add('email'); // this.email.nativeElement.focus(); if (this.message) {
// setTimeout(() => { this.message.forEach((message) => {
message.days = 30;
});
this.cd.detectChanges();
// }) }
}
[image: screen shot 2017-11-23 at 2 57 50 pm]
<https://user-images.githubusercontent.com/1532640/33176252-bb628c1a-d05e-11e7-8d58-35ecd05828d1.png>
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABlEoIvjIzXTzlo4iwFctAnP-wsZ--Egks5s5XqggaJpZM4QozCv>
.
--
@toddmotto