-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to import/use library on clean Angular CLI project #57
Comments
Duplicate of #88 |
Hi @edoardoo . That's not how you import import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { Bootstrap4FrameworkModule } from 'angular6-json-schema-form';
import { AppComponent } from './app.component';
@NgModule({
declarations: [ AppComponent ],
imports: [
BrowserModule
Bootstrap4FrameworkModule
],
providers: [],
bootstrap: [ AppComponent ]
})
export class AppModule { } And you use the component like the following: <json-schema-form
loadExternalAssets="true"
[schema]="schema"
framework="bootstrap-4"
(onSubmit)="submit($event)">
</json-schema-form> If you still face the same issue, can you make a repository to reproduce this issue? |
This issue may still need to be open. Even if you correctly only import NoFrameworkModule, you get an error saying json-schema-form is not a known element. If you create a new app, install dependencies, and set up with NoFrameworkModule, this occurs. import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { NoFrameworkModule } from 'angular6-json-schema-form'
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
NoFrameworkModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { } My current workaround is to also import one of the other modules (e.g. MaterialDesignFrameworkModule). |
Describe the bug
which template:
Tried using the library both on the project I'm working on and on a brand new clean project created using Angular CLI. Followed the instructions both on README.md and the example project, both lead to errors.
To Reproduce
Steps to reproduce the behavior:
ng new testAngular
package.json
and runningrm -rf node_modules/ && npm i
:app.module.ts
:the yourJsonSchema is a random form taken from the example category
5.
ng serve
Expected behavior
The app compile and shows a form.
Screenshots
No relevant screenshot saved.
Desktop (please complete the following information):
Log output covering before error and any error statements
Additional context
Importing the library as specified in the README.md didn't work either.
The text was updated successfully, but these errors were encountered: