lundi 24 août 2015

Appending handlebars content in google maps infowindow

I have a google maps infowindow and i want to append a handlebars including string in it. Currently i am using:

marker.infowindow = new google.maps.InfoWindow({
              content: '<h5>' + '<b>' + self.get('i18n').t('apiary.new_title').string + ': </b>' + '</h5>'+
                  '<div id="bodyContent">'+ Ember.Handlebars.compile('<div class="form-group"> {{input value=name type="text" placeholder="Apiary Name" class="form-control"}} </div>') + 
                  '</div>',
              options: {
                maxWidth: 200
              }
            });

However the compile results into an Object and not a string. Is it possible to compile into a string and of course keep the value always bound when the user changes the form ?




Aucun commentaire:

Enregistrer un commentaire