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
{ | |
... | |
"architect": { | |
"build": { | |
... | |
"configurations": { | |
"production-fr": { | |
"fileReplacements": [ | |
{ | |
"replace": "src/environments/environment.ts", |
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: [ | |
CommonModule | |
], | |
declarations: [LazyComponent], | |
entryComponents: [LazyComponent] | |
}) | |
export class LazyModule { | |
static entry = LazyComponent; | |
} |
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 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 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
<div style="text-align:center"> | |
<div #testOutlet></div> | |
</div> |
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
"build": { | |
"builder": "@angular-devkit/build-angular:browser", | |
"options": { | |
... | |
"lazyModules": [ | |
"src/app/lazy/lazy.module" | |
] | |
} | |
... |
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 } 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 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 { 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 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
<ngx-data-table></ngx-data-table> |
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, OnInit, ViewChild, Input } from '@angular/core'; | |
import { MatPaginator, MatSort } from '@angular/material'; | |
import { NgxDataTableDataSource } from './ngx-data-table-datasource'; | |
@Component({ | |
selector: 'ngx-data-table', | |
templateUrl: './ngx-data-table.component.html', | |
styleUrls: ['./ngx-data-table.component.css'] | |
}) | |
export class NgxDataTableComponent { |
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 { DataSource } from '@angular/cdk/collections'; | |
import { MatPaginator, MatSort } from '@angular/material'; | |
import { map } from 'rxjs/operators'; | |
import { Observable, of as observableOf, merge } from 'rxjs'; | |
/** | |
* Data source for the NgxDataTable view. This class should | |
* encapsulate all logic for fetching and manipulating the displayed data | |
* (including sorting, pagination, and filtering). |
OlderNewer