1.0.40 • Published 6 years ago

ngx-formly-components v1.0.40

Weekly downloads
80
License
MIT
Repository
github
Last release
6 years ago

GitHub issues GitHub stars GitHub license Twitter

Notice:

This is still a work in progress, not to be used in production environments... yet.

Table of contents

  1. Getting Started
  2. Installation instructions
  3. Running the demo
  4. Components
  5. Wrappers
  6. Demo Code

Getting Started

Ngx-formly-components is an Angular 4+ module which contains a set of ready-to-use, easily configurable components to aid those who seek to create and mantain forms on the fly almost effortlessly. It is designed to work along with @angular/material and ng-formly, which means you'll get really cool looking JSON configurable forms.

To get started there's a couple of steps required by angular material you'll have to complete before being able to use any components properly:

1. Include a theme

Including a theme is required to apply all of the core and theme styles to your application. To get started with a prebuilt theme, include one of Angular Material's prebuilt themes globally in your application. If you're using the Angular CLI, you can add this to your styles.css:

@import "~@angular/material/prebuilt-themes/indigo-pink.css";

If you are not using the Angular CLI, you can include a prebuilt theme via a element in your index.html. For more information on theming and instructions on how to create a custom theme, see the theming guide.

2. Add material icons

Include this line in your index.html if you don't plan on hosting the icons yourself:

<link href="https://fonts.googleapis.com/icon?family=Material+Icons"rel="stylesheet">

Otherwise you first have to download the icon font:

npm install material-design-icons --save

Once that's done downloading browse your node_modules folder and copy the iconfont folder from inside the material-design-icons folder to your project's assets folder. Afterwards include assets/material/iconfont/material-icons.css to your project and you're set.

Installation instructions

Install ngx-formly-components from npm

npm install ngx-formly-components@latest --save

Import FormlyComponentsModule

import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';

import { FormlyComponentsModule } from 'ngx-formly-components';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormlyComponentsModule.forRoot(),
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Running the demo

> npm install
> ng serve
>>> Open your browser on `http://localhost:4200`

Components

Input


InputType
placeholderstring
disabledboolean
format(e: string) => string
sourceObservable<string[]>
keydown(e: any)=>void
passwordboolean
maxLengthnumber

@source: A list which enables autocomplete capabilities

Textarea

InputType
placeholderstring
disabledboolean
format(e: string) => string
keydown(e: any, shift: boolean)=>void
maxLengthnumber
minRowsnumber
maxRowsnumber

Select


InputType
placeholderstring
disabledboolean
format(e: string) => string
nonullboolean
maxRowsnumber
minRowsnumber
maxLengthnumber
changed(e: any) => void

Select-Autocomplete


InputType
placeholderstring
disabledboolean
sourceObservable<{ name: string, value: string | number }[]>
nonullboolean
tooltip'before'|'after'|'above'|'below'|'left'|'right'
debounceTimenumber
changed(e: any) => void

Autocomplete


InputType
placeholderstring
disabledboolean
source(e: string)=>Observable<{ name: string, value: string |value: 2 }])}
tooltip'before'|'after'|'above'|'below'|'left'|'right'
debounceTimenumber
changed(e: any) => void

Checklist

InputTypeExample
textstring'I agree'
disabledbooleantrue

Datetime

InputType
placeholderstring
disabledboolean
formatstring
tooltipstring
mask(string | RegExp)[]

Chips

InputType
placeholderstring
disabledboolean
sourceObservable<string[]>
onlyAutocompleteboolean
maxItemsnumber
changed(e: any) => void

Address-Picker

Not yet documented

Repeated-Section

Not yet documented

Blank

Just a blank, can be useful. Might want to check out app.component.ts

Wrappers

  • Section
  • Split
  • Card

Demo code

All available components are being used in the demo code, check out app.component.ts for more detailed information on how to use each.

Issues

Feel free to submit any issues or features you want to see in the future! Happy coding!

1.0.40

6 years ago

1.0.39

6 years ago

1.0.38

6 years ago

1.0.37

6 years ago

1.0.36

6 years ago

1.0.35

6 years ago

1.0.34

6 years ago

1.0.33

7 years ago

1.0.32

7 years ago

1.0.31

7 years ago

1.0.30

7 years ago

1.0.29

7 years ago

1.0.28

7 years ago

1.0.27

7 years ago

1.0.26

7 years ago

1.0.25

7 years ago

1.0.24

7 years ago

1.0.23

7 years ago

1.0.22

7 years ago

1.0.21

7 years ago

1.0.20

7 years ago

1.0.19

7 years ago

1.0.18

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

0.0.28

7 years ago

0.0.27

7 years ago

0.0.26

7 years ago

0.0.25

7 years ago

0.0.24

7 years ago

0.0.23

7 years ago

0.0.22

7 years ago

0.0.21

7 years ago

0.0.20

7 years ago

0.0.19

7 years ago

0.0.18

7 years ago

0.0.17

7 years ago

0.0.16

7 years ago

0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.42

7 years ago

0.0.41

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago