TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How to do OO in AngularJS

1 点作者 huula将近 11 年前

2 条评论

keda将近 11 年前
Does this code even work? The $s in BaseController seem to come from no where, I believe Angular will inject $scope as first parameter to the constructor, however, in the sample code, it seems to indicate that its pattern. For a good angular+coffeescript scaffold code with basic OO, I recommend take a look at <a href="https://github.com/CaryLandholt/AngularFun" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;CaryLandholt&#x2F;AngularFun</a>
评论 #8013188 未加载
huula将近 11 年前
OO is important in almost all cases. Because for a cohesive system, you will always have some part to share across components.