We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://github.com/angular-cn/ng-nice/blob/master/core/data/base.js#L12
在base里面定义了self = this; get_list_age 则直接使用self,会出现个问题
post、user都继承于base,导致最后获取post列表时候,里面的self.model使用了user的。 初步认为,post、user 使用同一个base为原型,在base原型里面保存self,导致共用一套的原型最后保存的model为user的。
然后,我就在get_list_page方法里面定义var self = this;最外面保存的self注释掉, 就没问题了。 你看下代码是不是存在这个问题?
The text was updated successfully, but these errors were encountered:
应该有这个问题存在,我在其他项目中碰到过,好久没有修改这里面的代码了,多谢提醒。
Sorry, something went wrong.
No branches or pull requests
https://github.com/angular-cn/ng-nice/blob/master/core/data/base.js#L12
在base里面定义了self = this;
get_list_age 则直接使用self,会出现个问题
post、user都继承于base,导致最后获取post列表时候,里面的self.model使用了user的。
初步认为,post、user 使用同一个base为原型,在base原型里面保存self,导致共用一套的原型最后保存的model为user的。
然后,我就在get_list_page方法里面定义var self = this;最外面保存的self注释掉, 就没问题了。
你看下代码是不是存在这个问题?
The text was updated successfully, but these errors were encountered: