gitana / alpaca

Alpaca provides the easiest way to generate interactive HTML5 forms for web and mobile applications. It uses JSON Schema and simple Handlebars templates to generate great looking, dynamic user interfaces on top of Twitter Bootstrap, jQuery UI, jQuery Mobile and HTML5.
http://www.alpacajs.org
Other
1.29k stars 370 forks source link

Can we use alpaca with typescript or Angular 4 #538

Open rockers007 opened 7 years ago

rockers007 commented 7 years ago

Can we use alpaca with typescript or Angular 4

andreaswarnaar commented 7 years ago

Did you found a solution?

WhileTrueEndWhile commented 6 years ago

You have to include Jquery, Handlebars and Alpaca in your index.html. Then you could declare Jquery very dirty in a *.d.ts file... declare const $: any; Ready to go :)

kikkiraj commented 6 years ago

@WhileTrueEndWhile can you share your code.

WhileTrueEndWhile commented 6 years ago
  1. Avoid the angular-cli -I don't use it, because I have to inlcude other shitty libs and I don't want to struggle with it. Use the raw ngc + rollup for aot, if thats part of the problem.
  2. Do what my first post describes (maybe the query definitions could be extended either).
  3. Create an AlpacaComponent (template: <div [id]="myId"></div>) with config as input which creates the alpaca form using $("#" + this.myId).alpaca(this.config) on ngAfterViewInit.

Good luck!

jaiberman commented 4 years ago

Any support to material angular version 8 or above? using angular-cli?