1

For the optimisation and quick rendering I need to be able to compile html in javascript side of the component. In ember 1.x we could do something like this https://api.emberjs.com/ember/1.0/classes/Ember.Handlebars, But in Ember 3.x I cant see compile function when I use Ember.Handlebars.compile()

What is the best way of doing that? Thanks

Zardaloop
  • 1,594
  • 5
  • 22
  • 43
  • Why exactly do you need this? It won't be easy, and quite bad for performance. – Lux Jul 15 '20 at 15:19
  • I only need to compile part of the handlebar, not all of it. Because {{each has a serious performance issue. Do you know how that can be done in ember 3.x? – Zardaloop Jul 15 '20 at 15:23
  • 2
    what performance issues do you have with `{{#each`? It is much faster then to ember `1.x` times. As I said, while probably not impossible it will be hard and *really* bad for performance. Can you go a bit into the details why you need this? Maybe you want to discuss this in the ember Discord channel? – Lux Jul 15 '20 at 16:14
  • @Lux thanks will do that – Zardaloop Jul 15 '20 at 17:24
  • Compiling ahead of time will be always quicker by definition as at run-time. You may need run-time compilation of glimmer templates for projects like Ember Twiddle or Storybook but trying to optimize performance is not a good reason to do so. – jelhan Jul 15 '20 at 17:47

0 Answers0