formio / angular

JSON powered forms for Angular
https://formio.github.io/angular-demo
MIT License
623 stars 466 forks source link

form manager doesn't work #456

Open sarashid opened 4 years ago

sarashid commented 4 years ago

i'm trying to use a Form Manager but this error keep show up error

travist commented 4 years ago

You need to have an AppConfig in your application. See https://help.form.io/intro/guide/#appconfig and you add it to your module like this.

...
...
import { AppConfig } from './config';
import { FormioAppConfig } from 'angular-formio';

@NgModule({
  ...
  ...
  providers: [
    {provide: FormioAppConfig, useValue: AppConfig}
  ]
})
export class AppModule { }
sarashid commented 4 years ago

actually i added appConfig to my project but i still have the same issue

travist commented 4 years ago

The error is No provider for FormioAppConfig and my suggestion was to add it to the providers of your module. I am not sure why this would not work. Please provide a demo of the issue so we can see how your code is structured. Do you have multiple modules in your application?

sarashid commented 4 years ago

I tried to add authentication module and form module, there is my demo : https://github.com/sarashid/form-Builder

sarashid commented 4 years ago

@travist

travist commented 4 years ago

I am curious if anyone else is having this problem. Nobody else is really chiming in.... one that happens I will take a look.

binury commented 4 years ago

It seems like there's no way to use the formbuilder without adding some API URL. If you use a blank appConfig the form builder will not launch at all. If you add a dummy placeholder like '' or demo it will throw console errors.

stevenbowler commented 3 years ago

StaticInjectorError(AppModule)[IndexComponent -> FormManagerService]: image Have followed the recommendations above, still getting the same error. Any further recommendations will be appreciated. Code is here dev branch: https://dev.azure.com/stevenbowler1/angularFormIO/_git/sbFormIO
Cheers.

radonyizsolt commented 1 year ago

Hi, having the same issue. Any updates on this?