您好我刚刚看到了使用ember-cli创建ember-addon的教程。 复制它 版本 灰烬检查员 1.7.3 烬 1.11.1 Ember数据 1.0.0-beta.16.1 jQuery的 1.11.3 EmberComputedFilter 0.0.0.547aa481
命令 ember addon ember-computed-filter
//测试/虚设/应用/控制器/ application.js中
import Em from 'ember';
export default Em.Controller.extend({
name: 'Myname',
trimmedName: function() {
return this.get('name').trim();
}.property('name')
});
问题绝对是计算属性。 我不确定我的控制器是否放在右侧文件夹中
答案 0 :(得分:1)
我错过了这个https://github.com/ember-cli/ember-cli/pull/3645
来自指南。 http://guides.emberjs.com/v1.11.0/configuring-ember/disabling-prototype-extensions/
server {
listen 80;
server_name example.com;
access_log off;
error_log on;
# deny access to .XYZ files
location ~ /\. {
return 403;
}
location ~ sitemap\.xml {
return 301 http://example.com/sitemap.php;
}
location ~ .php$ {
# Here you have to decide how to handle php
# Generic example configs below
# Uncomment and fix up one of the two options
# Option 1: Use FastCGI
#fastcgi_index index.php;
#include fastcgi_params;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
# Option 2: Pass to Apache
# Proxy_pass localhost:APACHE_PORT
}
location / {
try_files $uri $uri/ @router;
}
location @router {
rewrite ^/([0-9]+)/?(.*)/?$ /index.php?id=$1&slug=$2 last;
}
}