-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在app.js中自定义Controller基类的私有方法后,controller中无法使用 #1755
Labels
Comments
如果不想用函数的方式,可以直接 require 基类 这篇文档也要改下 |
同时需要 |
文档我等下看看怎么优化一下 |
先把我那些合并后再改吧。
发自我的 iPhone
… 在 2017年11月28日,23:11,Yiyu He ***@***.***> 写道:
文档我等下看看怎么优化一下
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
https://github.com/eggjs/egg/blob/docs-2.x-async-function/lib/egg.js#L123 这几个是不是改为 setter 和 getter 好点? |
4 tasks
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Node Version: v8.0.0
Egg Version: v2.0.0
Plugin Name: 无
Plugin Version: 无
Platform: iMac
Mini Showcase Repository: 无
这是按照文档中 自定义 Controller 基类 的代码写的:
// app.js
// app/controller/home.js
访问
http://127.0.0.1:7001/
报错:
2017-11-28 21:25:04,471 ERROR 58662 [-/127.0.0.1/-/8ms GET /] nodejs.TypeError: this.success is not a function
但是这么写就可以:
// app/controller/home.js
The text was updated successfully, but these errors were encountered: