Skip to content
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

Very simple storage service for formly json #397

Closed
wants to merge 2 commits into from

Conversation

chrisekelley
Copy link
Member

@chrisekelley chrisekelley commented Jul 27, 2017

I originally had planned to use json within the formly templates; unfortunately, the typescript compiler does not accept json (or to be more accurate, does not permit un-escaped '{'). It throws this error:

compiler.es5.js:1689 Uncaught Error: Template parse errors:
Invalid ICU message. Missing '}'. ("

Some discussions on this topic:

Good news may be that ngNonBindable might be a solution. Until I have tested that out, here is another option, that also could be a start for supporting the use of a GUI editor for forms creation (that saves form data as json).

Service is super-simple - form json is hard-coded in class.

At this point, the default markup format for tangerineBaseCard is yaml. But you have the option to use json:

<tangerine-form-card markup="json" formid="efcard1" #efcard1>
</tangerine-form-card>

There are a couple choices we could make:

  • modify service to store json to pouchdb
  • save json to a separate file (like the html template) read it upon startup, store in a service, and retrieve as needed.

@chrisekelley chrisekelley changed the title created very simple storage service for formly json Very simple storage service for formly json Jul 27, 2017
@chrisekelley
Copy link
Member Author

I also tested out ngNonBindable, that wasn't a solution.

@rjcorwin
Copy link
Contributor

@chrisekelley This is some interesting work. Shall we review for merging or are we thinking we are pivoting and should close?

@chrisekelley
Copy link
Member Author

chrisekelley commented Jul 28, 2017

@rjsteinert It's a little early for this concept; if we push forward with the CKEditor approach we discussed last night, then it's worth revisiting this, refactoring instead to use a new component that follows the pattern you introduced in Tangerine/client-v3/pages/forms/demo.html

@rjcorwin
Copy link
Contributor

@chrisekelley Now that Formly is deprecated, I'll close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants