This file contains 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: [ | |
CommonModule | |
], | |
declarations: [LazyComponent], | |
entryComponents: [LazyComponent] | |
}) | |
export class LazyModule { | |
static entry = LazyComponent; | |
} |
This file contains 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 AppComponent implements AfterViewInit { | |
@ViewChild('testOutlet', {read: ViewContainerRef}) testOutlet: ViewContainerRef; | |
constructor( | |
private loader: NgModuleFactoryLoader, | |
private injector: Injector) { | |
} | |
ngAfterViewInit(): void { | |
const path = 'src/app/lazy/lazy.module#LazyModule'; |
This file contains 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
<div style="text-align:center"> | |
<div #testOutlet></div> | |
</div> |
This file contains 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
"build": { | |
"builder": "@angular-devkit/build-angular:browser", | |
"options": { | |
... | |
"lazyModules": [ | |
"src/app/lazy/lazy.module" | |
] | |
} | |
... |
This file contains 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 } from '@angular/core'; | |
import { CommonModule } from '@angular/common'; | |
import { NgxDataTableComponent } from './ngx-data-table.component'; | |
import { MatTableModule, MatPaginatorModule, MatSortModule } from '@angular/material'; | |
@NgModule({ | |
imports: [ | |
CommonModule, | |
MatTableModule, | |
MatPaginatorModule, |
This file contains 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 { BrowserModule } from '@angular/platform-browser'; | |
import { NgModule } from '@angular/core'; | |
import { AppComponent } from './app.component'; | |
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | |
import { NgxDataTableModule } from 'projects/ngx-data-table/src/lib/ngx-data-table/ngx-data-table.module'; | |
@NgModule({ | |
declarations: [ | |
AppComponent |
This file contains 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
<ngx-data-table></ngx-data-table> |
This file contains 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
<div class="mat-elevation-z8"> | |
<mat-table #table [dataSource]="dataSource" matSort aria-label="Elements"> | |
<ng-container [matColumnDef]="cols" *ngFor="let cols of displayedColumns"> | |
<mat-header-cell *matHeaderCellDef mat-sort-header> {{cols}} </mat-header-cell> | |
<mat-cell *matCellDef="let element"> {{element[cols]}} </mat-cell> | |
</ng-container> | |
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row> | |
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row> |
This file contains 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 } from '@angular/core'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'] | |
}) | |
export class AppComponent { | |
title = 'app'; | |
data: any[] = [ |
This file contains 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} from '@angular/core'; | |
import * as faker from 'faker'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'], | |
}) | |
export class AppComponent { | |
title = 'app'; |
OlderNewer