- Install ionic via
npm install -g [email protected]
(or follow instructions at Installing Ionic) - Clone this repo
- Install dependencies via
npm install
- Execute
ionic serve
. Alternatively, if you want to execute the app within the emulator, follow the instructions from the Ionic Docs (Make sure to have your $JAVA_HOME, $ANDROID_HOME environment variables configured).
If you want to make use of the ionic-renderers in your own project, please follow these guidelines:
- Install dependencies
npm i @jsonforms/core
npm i @jsonforms/angular
npm i @jsonforms/ionic-renderers
- Import
JsonFormsIonicModule
and add it to theimports
section - Create a store configuration, e.g. in a file called
store.ts
and add the following contents
import { combineReducers, Reducer } from 'redux';
import {
jsonformsReducer,
JsonFormsState
} from '@jsonforms/core';
import {ionicRenderers} from "@jsonforms/ionic-renderers";
export const rootReducer: Reducer<JsonFormsState> = combineReducers({ jsonforms: jsonformsReducer() });
export const initialState: any = {
jsonforms: {
renderers: ionicRenderers,
fields: [],
}
};
- Initialize the store via ngRedux (e.g. within
ngOnInit
of your app module)import {Actions} from '@jsonforms/core'; import {initialState, rootReducer} from './store'; ngRedux.configureStore( rootReducer, initialState ); ngRedux.dispatch( Actions.init( data, schema uischema ) );
- ListWithDetail (a master/detail view where the master is rendered as a flat list)
- Booleans
- Strings
- String (with format support for email/telephone)
- Multiline string
- Date
- Numbers
- Enums (for strings/numbers)
- Select
- Autocomplete (customizable)
- Labels