Example 1 - We will need to create shared module and this shared module is import in AppModule file i.e. Shared.module.ts - import { NgModule } from '@angular/core' ; import { FormsModule } from '@angular/forms' ; import { FileSelectDirective , FileDropDirective } from 'ng2-file-upload' ; import { FileUploadModule } from 'ng2-file-upload/ng2-file-upload' ; @ NgModule ({ imports: [ FileUploadModule ], declarations: [ ], exports : [ FileSelectDirective , FileDropDirective , FormsModule , FileUploadModule ], }) export class SharedModule { } Import share.Module in the AppModule i.e. import { NgModule } from '@angular/core' ; import { SharedModule } from '../shared/shared.module' ; @ NgModule ({ imports: [ SharedModule ], ...
Angular, React, JavaScript, Java, PHP, SQL, C#, Vue, NodeJs, TypeScript and Interview Questions Answers