Code Monkey home page Code Monkey logo

Comments (12)

woutervs avatar woutervs commented on July 18, 2024

I'm going to link this issue in the pull request with a fix for this.
Deeper investigation pointed out it occurs since angular version @angular/forms 7.2.2 and @angular/flex-layout": "^7.0.0-beta.23

from ajsf.

hamzahamidi avatar hamzahamidi commented on July 18, 2024

Hi @woutervs . Thank you for using Angular6-json-schema-form. Can you please provide a valid JSON to reproduce this issue?

from ajsf.

woutervs avatar woutervs commented on July 18, 2024

{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"Contact": {
"type": "object",
"properties": {
"Displayname": {
"type": [
"string"
]
},
"Id": {
"type": "integer"
}
},
"required": [
"Displayname",
"Id"
]
}
},
"type": "object",
"properties": {
"Firstname": {
"type": [
"string",
"null"
],
"minLength": 2
},
"Lastname": {
"type": "string"
},
"Email": {
"type": [
"string",
"null"
],
"format": "email"
},
"Birthday": {
"type": "string",
"format": "date"
},
"Contact": {
"$ref": "#/definitions/Contact"
}
},
"required": [
"Firstname",
"Lastname",
"Email",
"Birthday"
]
}

In a clean angular project with material design all at the latest version.

from ajsf.

hamzahamidi avatar hamzahamidi commented on July 18, 2024

I tried to reproduce the issue with the following JSON, but I couldn't. Can you please explain further the steps using the DEMO?

{
   "schema": {
      "type": "object",
      "title": "Comment",
      "properties": {
         "name": {
            "title": "Name",
            "type": "string"
         },
         "email": {
            "title": "Email",
            "type": "string",
            "pattern": "^S+@S+$",
            "description": "Email will be used for evil."
         },
         "comment": {
            "title": "Comment",
            "type": "string",
            "maxLength": 20,
            "validationMessage": "Don't be greedy!"
         },
         "contact": {
            "type": "object",
            "title": "Contact",
            "properties": {
               "firstname": {
                  "title": "Firstname",
                  "type": "string"
               },
               "lastname": {
                  "title": "Lastname",
                  "type": "string"
               }
            }
         }
      },
      "required": [
         "name",
         "email",
         "comment"
      ]
   }
}

from ajsf.

hamzahamidi avatar hamzahamidi commented on July 18, 2024

Can you reproduce the issue in the demo? https://hamidihamza.com/Angular6-json-schema-form

from ajsf.

woutervs avatar woutervs commented on July 18, 2024

So what I did to reproduce it in the demo app
1.: Clean git pull of the master
2.: npm install
3.: Create test-schema.json src\assets\example-schemas\test-schema.json
4.: src\app\demo.module.ts fix imports
5.: src\app\demo.component.ts fix imports
6.: src\app\example-schemas.model.ts add test-schema
7.: ng s -o
If you look in developer tools you'll see the endswith error

from ajsf.

hamzahamidi avatar hamzahamidi commented on July 18, 2024

Maybe related to angular/flex-layout#1011

from ajsf.

woutervs avatar woutervs commented on July 18, 2024

Not only related, but the exact error.

from ajsf.

woutervs avatar woutervs commented on July 18, 2024

Reverting to 7.0.0-beta.19 seems to resolve the issue for now.
Thanks for pointing out the angular/flex-layout#1011 issue I hadn't found it earlier because I first added this issue in the angular7-json-schema-form fork of this project, though that developer doesn't seem to work on it anymore.

from ajsf.

hamzahamidi avatar hamzahamidi commented on July 18, 2024

Closed as not related to Angular6-json-schema-form

from ajsf.

lamba92 avatar lamba92 commented on July 18, 2024

Reverting to 7.0.0-beta19 did not solve the issue for me. Have you done something else?

from ajsf.

syrine10 avatar syrine10 commented on July 18, 2024

Hello I have the same problem and I'm in angular 8. Did you solve this ?

from ajsf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.