简体   繁体   中英

Render a template on it's own ember.js

How can I render a template without it being inside it's parent.

For example, I need to render the login template, but I do not want it to be inside the index template.

So I want the login template to be on it's own. Is this possible?

App.FooView = Em.View.extend({

});


var foo = App.FooView.create();
foo.appendTo('#somewhere');

and to remove

foo.remove();

http://emberjs.com/api/classes/Ember.View.html

http://emberjs.com/guides/views/defining-a-view/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM