# @mobileia/core

Latest version **11.0.0** (published 2021-01-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install @mobileia/core
pnpm add @mobileia/core
yarn add @mobileia/core
bun add @mobileia/core
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 11.0.0 |
| Published | 2021-01-08 |
| First published | 2018-06-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 287.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Matias Camiletti |
| Maintainers | matiascamiletti |

## Links

- npm: https://www.npmjs.com/package/@mobileia/core
- Repository: https://github.com/MobileIA/mia-core-angular
- Homepage: https://github.com/MobileIA/mia-core-angular#readme
- Issues: https://github.com/MobileIA/mia-core-angular/issues
- npm.io page: https://npm.io/package/@mobileia/core

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.0.0

## Recent versions

- 11.0.0 (latest) — 2021-01-08
- 9.0.3 — 2020-05-19
- 9.0.2 — 2020-04-24
- 9.0.1 — 2020-03-21
- 9.0.0 — 2020-03-04
- 8.0.10 — 2020-01-26
- 8.0.9 — 2020-01-26
- 8.0.8 — 2020-01-26
- 8.0.7 — 2020-01-25
- 8.0.6 — 2020-01-22
- 8.0.5 — 2020-01-16
- 8.0.4 — 2020-01-12
- 8.0.3 — 2019-11-29
- 8.0.1 — 2019-09-21
- 0.0.19 — 2019-06-13
- … 18 more at https://npm.io/package/@mobileia/core/versions

## README

# MobileIA Core Angular

Libreria para que contiene codigo generalizado que puede utilizarse en todos los proyectos

## Como usar
1. Instalar libreria via [npm](http://npmjs.com):
```bash
npm install @mobileia/core
```

## Generar formularios dinamicos
1. Generar array de elementos:
```js
public fields: any[] = [
    {
      type: 'text',
      name: 'firstName',
      label: 'First Name',
      value: '',
      required: false,
    },
    {
      type: 'text',
      name: 'lastName',
      label: 'Last Name',
      value: '',
      required: false,
    },
    {
      type: 'text',
      name: 'email',
      label: 'Email',
      value: '',
      required: false,
    },
    {
      type: 'filezone',
      name: 'picture',
      label: 'Picture',
      required: false,
      onUpload: this.onUpload.bind(this)
    },
    {
      type: 'select',
      name: 'country',
      label: 'Country',
      value: 'in',
      required: false,
      options: [
        { key: 'in', label: 'India' },
        { key: 'us', label: 'USA' }
      ]
    },
    {
      type: 'radio',
      name: 'gender',
      label: 'Gender',
      value: 'm',
      required: false,
      options: [
        { key: 'm', label: 'Male' },
        { key: 'f', label: 'Female' }
      ]
    },
    {
      type: 'checkbox',
      name: 'hobby',
      label: 'Hobby',
      required: false,
      options: [
        { key: 'f', label: 'Fishing' },
        { key: 'c', label: 'Cooking' }
      ]
    }
  ];
```
2. Generar metodo para recibir respuesta cuando se envia:
```js
onSend(values){
    console.log(values);
  }
```
3. Agregar elemento en el HTML:
```html
<mia-dynamic-form [fields]="fields" (onSend)="onSend($event) "></mia-dynamic-form>
```

---
_Source: https://npm.io/package/@mobileia/core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
