How to use the angular-formio/resource.FormioResourceRoutes function in angular-formio

To help you get started, we’ve selected a few angular-formio examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github formio / angular-app-starterkit / src / app / resources / event / event.module.ts View on Github external
// provide our own Event resource page.
@Component({
  styles: [
    'ul.nav.nav-tabs { margin-bottom: 20px; }',
    '.resource-back-icon { font-size: 1.2em; padding: 0.6em; }'
  ],
  template: require('./event.html')
})
export class EventResourceComponent extends FormioResourceComponent {
  constructor(public service: FormioResourceService, public route: ActivatedRoute) {
    super(service, route);
  }
}

// add the Activity nested resource.
let eventResourceRoutes: Routes = FormioResourceRoutes({
  resource: EventResourceComponent
});
eventResourceRoutes[2].children.push({
  path: 'activity',
  loadChildren: 'es6-promise-loader?,[name]!../activity/activity.module#ActivityResource'
});

@NgModule({
  imports: [
    CommonModule,
    FormioResource,
    RouterModule.forChild(eventResourceRoutes)
  ],
  declarations: [
    EventResourceComponent
  ],
github formio / angular-app-starterkit / src / app / resources / user / user.module.ts View on Github external
'' +
        '' +
      '' +
    ''
})
export class UserViewComponent extends FormioResourceViewComponent {
  constructor(public service: FormioResourceService, public config: FormioResourceConfig) {
    super(service, config);
  }
}

@NgModule({
  imports: [
    CommonModule,
    FormioResource,
    RouterModule.forChild(FormioResourceRoutes({
      view: UserViewComponent
    }))
  ],
  providers: [
    FormioResourceService,
    {provide: FormioResourceConfig, useValue: {
      name: 'user',
      form: 'user'
    }}
  ],
  declarations: [
    UserViewComponent
  ]
})
export class UserResource {}
github formio / angular-app-starterkit / src / app / employee / employee.module.ts View on Github external
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import {
  FormioResource,
  FormioResourceConfig,
  FormioResourceRoutes,
  FormioResourceService
} from 'angular-formio/resource';

@NgModule({
  imports: [
    CommonModule,
    FormioResource,
    RouterModule.forChild(FormioResourceRoutes())
  ],
  declarations: [],
  providers: [
    FormioResourceService,
    {provide: FormioResourceConfig, useValue: {
      name: 'employee',
      form: 'employee'
    }}
  ]
})
export class EmployeeModule { }
github formio / angular-app-starterkit / src / app / event / participant / participant.module.ts View on Github external
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { FormioModule } from 'angular-formio';
import {
  FormioResource,
  FormioResourceRoutes,
  FormioResourceConfig,
  FormioResourceService
} from 'angular-formio/resource';

@NgModule({
  imports: [
    CommonModule,
    FormioModule,
    FormioResource,
    RouterModule.forChild(FormioResourceRoutes())
  ],
  declarations: [],
  providers: [
    FormioResourceService,
    {
      provide: FormioResourceConfig,
      useValue: {
        name: 'participant',
        form: 'participant',
        parents: [
          'event',
          {
            field: 'user',
            resource: 'currentUser',
            filter: false
          }
github formio / angular-app-starterkit / src / app / resources / activity / activity.module.ts View on Github external
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { AppConfig } from '../../../config';
import {
  FormioResource,
  FormioResourceRoutes,
  FormioResourceConfig,
  FormioResourceService
} from 'angular-formio/resource';

@NgModule({
  imports: [
    CommonModule,
    FormioResource,
    RouterModule.forChild(FormioResourceRoutes())
  ],
  providers: [
    FormioResourceService,
    {provide: FormioResourceConfig, useValue: {
      name: 'activity',
      form: 'activity',
      parents: ['event']
    }}
  ]
})
export class ActivityResource {}

angular-formio

Form.io Angular JSON Form Renderer ========================== This library serves as a Dynamic JSON Powered Form rendering library for [Angular](https://angular.io). This works by providing a JSON schema to a ```<formio>``` Angular component, where that f

MIT
Latest version published 4 years ago

Package Health Score

54 / 100
Full package analysis