angular2-json-schema-form icon indicating copy to clipboard operation
angular2-json-schema-form copied to clipboard

<json-schema-form> is not showing the form in the browser when I tried to add angular2-json-schema-form framework in our existing application

Open rmayuri opened this issue 6 years ago • 1 comments

Issue type

I'm submitting a (check one): [ ] Bug report [ ] Feature request [ ] Regression (something that used to work, but stopped working in a newer version) [ ] Support request [ ] Documentation issue or request

Prerequisites

Before posting, make sure you do the following (check all): [ ] Confirm you are using the latest versions of all necessary packages (or if not, explain why not) [ ] Search GitHub for a similar issue or PR [ ] If submitting a Support request, also search Stack Overflow for similar issues Note: Please cross-post GitHub support requests to Stack Overflow, and include a link in your GitHub issue to your Stack Overflow question. We do currently respond to support requests on GitHub, but we eventually expect to stop, and will then refer all support questions exclusively to Stack Overflow.

Current behavior

I added this framework with creating new project then it worked properly, now I need to add this framework with our existing application to build dynamic forms, so I did below steps to add, npm install --save @angular/material npm install --save @angular/cdk npm install --save @angular/animations npm install @angular/[email protected] npm install angular2-json-schema-form

added below in app.module.ts

import {JsonSchemaFormModule, NoFrameworkModule, Framework, WidgetLibraryService, FrameworkLibraryService, JsonSchemaFormService} from 'angular2-json-schema-form'; import {NoopAnimationsModule} from '@angular/platform-browser/animations';

added below in login.component.ts

import { Component } from '@angular/core'; @Component({ selector: 'app-login', templateUrl: './login.component.html', styleUrls: ['./login.component.css'] })

export class LoginComponent { title = 'Optum Navigator'; mySchema = { "properties": { "msid": { "type": "string", "required":true }, "password": { "type": "string", "widget": "password", "required":true },

  }

};

added below in login.component.html

{{title}}



Expected behavior

it should show a login page with username and password fields, but its showing the blank page

IMPORTANT: How can we reproduce your problem?

Environment

OS name & version: windows7 Browser name & version:chrome Angular version:"@angular/cli": "1.6.5", Angular JSON Schema Form version(s):"angular2-json-schema-form": "^0.7.0-alpha.1", Other relevant software or packages:

Any other relevant information

rmayuri avatar Apr 24 '18 14:04 rmayuri

You need to do more in your app.module.ts than shown.

You need to add it to the imports with a framework such as:

imports: [ JsonSchemaFormModule.forRoot(Bootstrap4FrameworkModule) ]

On Tue, Apr 24, 2018 at 2:27 PM, catull [email protected] wrote:

@rmayuri https://github.com/rmayuri Did you come back a read the issue ? Can't help you if you do not use proper Github Markup for the snippets you wrote. Clean up the snippets, it helps everyone. It is too much of a guesswork otherwise.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dschnelldavis/angular2-json-schema-form/issues/272#issuecomment-384033342, or mute the thread https://github.com/notifications/unsubscribe-auth/AbZl-0DYcfL0FiEKr4CCVeGFq7JTYevsks5tr252gaJpZM4ThzvS .

Thorski avatar Apr 24 '18 19:04 Thorski