Chrome Browser App / Chrome OS App


#1

I am trying to set up a Chrome App ( which also is the same as Chrome OS Apps ) using Ember. Has anyone gotten this working yet?


#2

I’m familiar with both Ember and the api’s for Chrome Apps. I’ve written several large chrome extensions, which share a lot of api’s with chrome apps. A chrome app is basically a website, so there’s no reason they wouldn’t work well together.


#3

Pardon me for asking for clarification. Are you saying you built Chrome Apps or that you have already built Chrome Extensions with Ember DevinRhode2?


#4

It was a while back but the only issue I ran across was with Handlebars. The solution was to precompile your templates and only include the Handlebars runtime.

Good luck!


#5

I would be very thankful for any resources helping to understand how to work with precompiled Handlebars templates in Ember. Haven’t found a complete example on the web so far.

P.S. I’m completely new to Ember.js

#6

One way would be to add them in the code:

Ember.TEMPLATES['books'] = Ember.Handlebars.compile('' +
'{{#each book in books}} ' + '{{view App.BookDetailsView valueBinding="book"}}' + '{{/each}} ');

This code is taken from the book “Ember in Action”:


#7

As I understand, the snippet perform compilation of a template. I could also compile templates using ember precompile from ember-tools package. How to tie precompiled templates together and actually use them? In general, I’m trying to make Ember work with Chrome packaged app.

It would be great if you would point to some post guide/tutorial doing that.

Thank you for the reply.


#8

Yes it precompiles the template. The template has the name “Books” and will be used if you define a corresponding route.

http://emberjs.com/guides/routing/defining-your-routes/

I have no experience writing chromeapps, but this is how it works in Ember.


#9

Thank you, @bracke. I’ll play around with that.