【发布时间】:2017-06-27 09:02:27
【问题描述】:
我想知道是否使用嵌套模板会非常消耗内存...
类似这样的:
Router.map(function() {
this.route('index', {path: '/'});
this.route('login');
this.route('authors', {path: 'authors'}, function() {
this.route('author', {path: ':author_id'}, function() {
this.route('book', {path: ':book_id'}, function() {
this.route('cart', {path: 'cart'});
});
});
});
});
比这更多内存吗?
Router.map(function() {
this.route('index', {path: '/'});
this.route('login');
this.route('authors', {path: '/authors'});
this.route('author', {path: '/author/:author_id'});
this.route('book', {path: '/book/:book_id'});
this.route('cart', {path: '/cart/:cart_id'});
});
【问题讨论】:
标签: javascript performance ember.js ember-data ember-cli