lvivski / hart

Hart — the heart of any Dart app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dart's code evaluation

enyo opened this issue · comments

Dart doesn't allow any code evaluation so you have to precompile all your templates.

Could you please elaborate a bit. How is template parsing code evaluation? What exactly is the problem here? And will it change in the future?

Thanks.

If you want to iterate over some lists in your template, or to call some methods from it (execute any code), you can't just evaluate a string (like eval() in Javascript). You have to compile the template first, so it will become native dart code. Then you can import it in your code.