Skip to content

Commit

Permalink
Revert "Add one more slide for standalone components"
Browse files Browse the repository at this point in the history
This reverts commit 8f0bb65.
  • Loading branch information
Eyüphan Yilmaz committed Oct 7, 2024
1 parent 8f0bb65 commit 45763eb
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions ng-module/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -347,30 +347,6 @@ <h3>Import Standalone Components</h3>
<code>UserProfile</code> component.
</aside>
</section>
<section>
<h3>How does it work?</h3>
<pre><code class="hljs typescript" data-trim data-noescape>
import { Component, ViewChild, AfterViewInit } from '@angular/core';
import { ProfilePhoto } from './profile-photo.component';

@Component({
standalone: true,
imports: [ProfilePhoto],
selector: 'user-profile',
template: `<profile-photo />`
})
export class UserProfile implements AfterViewInit {
<mark>@ViewChild(ProfilePhoto) profilePhotoComponent!: ProfilePhoto;</mark>

public photoInfo: string = '';

ngAfterViewInit() {
<mark>this.photoInfo = this.profilePhotoComponent.getPhotoInfo();</mark>
<mark>console.log('Photo URL:', this.profilePhotoComponent.photoUrl);</mark>
}
}
</code></pre>
</section>
<section>
<h3>Import Modules</h3>
<pre><code class="hljs typescript" data-trim data-noescape>
Expand Down

0 comments on commit 45763eb

Please sign in to comment.