1.0.2 • Published 7 years ago

ng-easy-dynamic v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

ng-easy-dynamic

Installation

To install this library, run:

$ npm install ng-easy-dynamic --save

Consuming your library

Once you have installed from npm , you can import this library in any Angular application for example:

in your Angular AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import your library
import { EasyDynamicModule } from 'ng-easy-dynamic';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,

    // Specify your library as an import
    EasyDynamicModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once your library is imported, you can use its directives "dynamicComponent" with "html","context","imports" attributes in your Angular application:

<!-- You can now use your library component in app.component.html -->
<h1>
  {{title}}
</h1>
<dynamicComponent [html]="your_custome_template" [context]="your_context" [imports]="your_extra_module_used_by_this_module"></dynamicComponent>

License

MIT © guzuomuse