English 中文(简体)
• 如何在“Tag”号集装箱中初步确定儿童要素?
原标题:How to initialize child elements in ContainerView Tag?

我如何在集装箱电文中初步确定儿童的内容?

例如,这一模板:

{{#view Ember.CardLayout}}

  {{view Ember.TextField}}

{{/view}}

以及这一观点:

/**
* [Table description]
* @type {[type]}
*/
Ember.CardLayout = Ember.ContainerView.extend({
    title: null,
    // ??? 
    childViews: [ testView ],
    testView: Ember.Checkbox.create(),
    render: function(buffer) {
      this.forEachChildView(function(view) {
        view.renderToBuffer(buffer);
      });
    }
});

非常感谢!

问题回答

http://docs.emberjs.com/#doc=Ember.ContainerView&src=false”rel=“nofollow”>。 这包括你可能认为有益的一些例子。 我这样建议:

App.cardLayout = Ember.ContainerView.create({
  title: null,
  childViews: [ testView ],
  testView: Ember.Checkbox.create()
});

然后是模板

{{view App.cardLayout}}

然后,你可以通过操纵<代码>来补充和删除看法。 App.cardLayout.get(儿童意见) Object.





相关问题
BigCommerce get featured blog based on blog post tag

I am trying to get the featured blog post based on the "featured" tag assigned to it. Below are my code logic. Is there any issue on the code below? I only want to display one featured blog-...

Including .hbs handlebars file in Typescript transpile

I ve been trying to use handlebars in my Typescript node.js project by importing it through the readFileSync fs method, however when the project is transpiled into Javascript the .hbs file does not ...

Handlebars.js in Django templates

I need a javascript templating system and i think handlebars.js does an excellent job in this case. I m having syntax conflicts with handlebars templates inside a django template because django tries ...

Handlebars Template rendering template as text

I created a helper in Handlebars to help with logic, but my template parses the returned html as text rather than html. I have a quiz results page that is rendered after the quiz is completed: <...

Change rails view output from helper

I have rails helpers (hs_if, hs_else): = hs_if :current_user do Hello, {{ current_user/name }}! = hs_else do = link_to Sign In , sign_in_path ...which produces handlebars templates: {{#if ...

Handlebar.js not refreshing my template

OK. My HTML looks like below. <div id="json"></div> <div id="content-placeholder"> <script id="some-template" type="text/x-handlebars-template"> <table> <...

Handlebars Template not able to process JSON from Backbone

Handlebars is unable to read the JSON object that I am sending it as context. Here is the function that makes the call to the Mustache template and gives it the context: render: function() { var ...

Calling Helper Within If Block in Handlebars Template

I am working with Handlebars.js template engine and am trying to figure out a way to do something like this (contrived example): {{#if itemSelected "SomeItem"}} <div>This was selected</...

热门标签