Re: emitting custom html5 elements from ionic
Carlo Capelli <[email protected]> Mon, 21 Apr 2014 10:31:11 +0200
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CABty9wx_6bT77sdiZ7bfD4WF-t7P95V0=7WHY6VAz8Bs=T15Ew@mail.gmail.com> |
2014-04-21 8:23 GMT+02:00 rlaanemets <[email protected]>: > You need to slightly adjust your terms, the following works: > > ?- phrase(html('ion-list'('ion-item'(['ng-repeat'='item in items', > item='item'], []))), Html), > print_html(Html). > <ion-list><ion-item ng-repeat="item in items" > item="item"></ion-item></ion-list> > Html = [<, 'ion-list', >, <, 'ion-item', ' ', 'ng-repeat', '="', 'item in > items'|...]. > > That is, functor names must be in quotes. Yes. I would add that this symbolic 'impedance mismatch' was a *real* nuisance when I interfaced bootstrap.js More on point, I wonder if Jon was missing - or doesn't appreciate - the power of \dcg_rules bye Carlo ion-list(...) would be a term > '-'(ion, list(...)) which html//1 treats as Fmt-Args for format/3. > Secondly, > tag/1 term assumes the only arg is for contents, so you need tag/2, with an > empty body. > > > > -- > View this message in context: > http://swi-prolog.996271.n3.nabble.com/emitting-custom-html5-elements-from-ionic-tp14844p14846.html > Sent from the SWI Prolog mailing list archive at Nabble.com. > _______________________________________________ > SWI-Prolog mailing list > [email protected] > https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog > -------------- next part -------------- HTML attachment scrubbed and removed