This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class AppModule { | |
public static ngModuleDef = defineNgModule({ | |
type: AppModule, | |
imports: [BrowserModule], | |
declarations: [AppComponent], | |
bootstrap: [AppComponent] | |
}); | |
public static ngInjectorDef = defineInjector({ | |
factory: () => new AppModule( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@NgModule({ | |
imports: [BrowserModule], | |
declarations: [AppComponent], | |
bootstrap: [AppComponent] | |
}) | |
export class AppModule { | |
constructor(resolver: ComponentFactoryResolver) {} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class AppModule { | |
public static ngModuleDef = defineNgModule({ | |
type: AppModule, | |
imports: [BrowserModule], | |
declarations: [AppComponent], | |
bootstrap: [AppComponent] | |
}); | |
public static ngInjectorDef = defineInjector({ | |
factory: () => new AppModule(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@NgModule({ | |
imports: [BrowserModule], | |
declarations: [AppComponent], | |
bootstrap: [AppComponent] | |
}) | |
export class AppModule {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Component, | |
ChangeDetectionStrategy, | |
ɵcreateInjector as createInjector, | |
Injector, | |
ViewChild, | |
ViewContainerRef | |
} from '@angular/core'; | |
@Component({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
NgModule, | |
ComponentFactoryResolver, | |
Injector, | |
ViewContainerRef, | |
ApplicationRef, | |
ComponentRef | |
} from '@angular/core'; | |
import { CommonModule } from '@angular/common'; | |
import { DomPortalHost, ComponentPortal } from '@angular/cdk/portal'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Component, | |
ChangeDetectionStrategy, | |
ɵcreateInjector as createInjector, | |
Injector, | |
ViewChild, | |
ViewContainerRef | |
} from '@angular/core'; | |
@Component({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule, ComponentFactoryResolver, ComponentFactory } from '@angular/core'; | |
import { CommonModule } from '@angular/common'; | |
import { CarouselComponent } from './carousel.component'; | |
@NgModule({ | |
imports: [CommonModule], | |
declarations: [CarouselComponent] | |
}) | |
export class CarouselModule { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, ChangeDetectionStrategy, HostListener } from '@angular/core'; | |
@Component({ | |
selector: 'app-carousel', | |
template: ` | |
<div class="carousel"> | |
<ng-template ngFor [ngForOf]="numbers" let-number let-index="index"> | |
<div class="number" *ngIf="activeIndex === index">{{ number }}</div> | |
</ng-template> | |
</div> |