Re: emitting custom html5 elements from ionic
rlaanemets <[email protected]> Sun, 20 Apr 2014 23:23:36 -0700 (PDT)
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[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. 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.