0.0.0 • Published 7 years ago
psg-dynamic-forms v0.0.0
psg-dynamic-forms
Example of angular components library workaround, based on @angular/cli project.
Notes
- It is @angular/cli library workaround, until angular/angular-cli#1692 will be solved
- It is based on the distributing sources files and supports
aot
build - It works well as dependency form regular @angular/cli project or ejected one
- It contains some commits to demonstrate all changes you need to make a library.
- It was generated by @angular/cli with
ng new psg-dynamic-forms --style scss -sd lib -p demo
- It has demo app, that could be used as documentation or sandbox. Use
ng serve -o true
to run it. - It exposes only
lib
directory.
TL;DR See @ns/ng-demo-app and live demo.
Usage
- create new @angular/cli project:
ng new ng-demo-app --style scss
- install library:
npm install --save git://git@github.com:nsmolenskii/psg-dynamic-forms.git
add module import declaration in
app.module.ts
:import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { HttpModule } from '@angular/http'; import { MaterialModule } from '@angular/material'; import { AppComponent } from './app.component'; import { DynamicFormModule } from 'psg-dynamic-forms'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, FormsModule, HttpModule, MaterialModule.forRoot(), DynamicFormModule ], providers: [], bootstrap: [AppComponent] })
use
dynamic-form
inapp.component.html
:<dynamic-form [form]="theForm"></dynamic-form>
- run project:
ng serve -o true
- profit
0.0.0
7 years ago