templates - Dart HTML templating on the client: Separating HTML from Dart code -
looking create html elements part of dart client side application.
there multiple approaches doing this.
ideally html template create new elements live rest of html , not inline dart code.
are there options separating html templates , dart code?
background
common approaches creating html content on fly:
create in code, explained here: how create html link in dart?
input string code, explained in above link.
use polymer, solve this, although appears require boilerplate. polymer appear overkill use cases don't require custom elements, data binding , other features.
there @ 1 point dart html template library, work stopped: http://blog.sethladd.com/2012/03/first-look-at-darts-html-template.html
there html5 'template' element. html5 'template' tag has limited (50%) support @ caniuse.com limits it's applicability.
you can use template_binding package polymer uses templates. might want use polymer_expressions package more powerful expression syntax.
the important bit don't need of polymer use those. check out polymer_expressions tests examples of using template_binding without rest of polymer.
Comments
Post a Comment