I'm creating with backbone a view for a meta tag
that I need it to be in the head
for obvious reasons.
The problem is that the output result I'm having is the meta
inside another meta
container. So I get this:
<head>
<meta>
<meta name="description" content="The description of the meta">
</meta>
</head>
I'm creating it like this:
var Useroptions = Backbone.View.extend({
initialize : function(d){
this.data = d.obj.data;
this.template = Handlebars.compile(d.obj.template);
d.parent.model.bind('change:category', this.openCategory);
this.render();
},
render: function(){
this.$el.html(this.template(this.data))
}
})
var App = Backbone.View.extend({
el : 'body',
model : new AppModel(),
initialize : function(){
var _this = this;
this.useroptions = new Useroptions({
obj : _app_.useroptions,
el : $('<meta />').appendTo('head'),
parent : this
});
});
Any idea on how to get this without the container so my output would be:
<head>
<meta name="description" content="The description of the meta">
</head>