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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Why I was Wrong to be Afraid of Angular.js, Part 2

45 点作者 lerouxb大约 11 年前

8 条评论

lerouxb大约 11 年前
I agree with just about everything in the post, but:<p>&gt; I think the fact that the Angular community has made real progress towards divorcing themselves from jQuery is one of the most encouraging signs for their future. The design of Angular is just different enough, and it is just compelling enough, that it has convinced a whole range of developers to build a new generation of libraries that I suspect are more likely to be suited to whatever the next iteration of the web as a platform will look like.<p>This part bothered me a bit. The article doesn&#x27;t make the case for why jQuery needs replacing or why all that duplicate effort is a good thing. Don&#x27;t get me wrong: I&#x27;m not married to jQuery and I&#x27;m open to the idea of there being a better way.<p>I just don&#x27;t find the idea that we have to move away from jQuery that self-evident.
评论 #7395164 未加载
评论 #7395150 未加载
评论 #7395113 未加载
评论 #7395507 未加载
singingfish大约 11 年前
We&#x27;ve been doing well encapsulated, tricky back end stuff for a while. Started with angular over the last month. Angular basically achieves the same proper separation of concerns that our perl-based back end tools do.<p>Angular is not really interesting because it&#x27;s the new big thing. It&#x27;s really interesting because it&#x27;s right. (bitch of a learning curve though).
评论 #7396192 未加载
评论 #7396081 未加载
AdrianRossouw大约 11 年前
This is part 2 of this discussion : <a href="https://news.ycombinator.com/item?id=7384937" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7384937</a>
ahuth大约 11 年前
You don&#x27;t need to worry about dependency injection breaking when your code is minified. You can supply a list of the dependencies as strings, and minified code will work fine:<p><pre><code> angular.module(&quot;whatever&quot;).controller(&quot;YourController&quot;, [&quot;dep1&quot;, &quot;dep2&quot;, function (dep1, dep2) { whatever... }]); </code></pre> Even though the `dep1` and `dep2` params get minified, angular will still pass in the correct dependencies.
评论 #7395079 未加载
评论 #7395066 未加载
hellbanTHIS大约 11 年前
I love it but it&#x27;s sometimes not as smart as it thinks it is. For instance they removed ng-bind-html-unsafe (because &quot;safety&quot;! Thanks Ralph Nader!) and now you have to jump through all kinds hoops to add a simple ng-click to a dynamically generated element.<p>That&#x27;s something that can be done in 30 seconds with jQuery but my determination in making it work the &#x27;Angular Way&#x27; has turned it into a 48 hour Donald Duck cartoon.
scotty79大约 11 年前
Angular seems not to have much of actual models (not view models), it&#x27;s all about the view components and syncing them with their view models. Backbone doesn&#x27;t have much support for the views, it&#x27;s all about models and collections and syncing them to the server.<p>Yet people don&#x27;t seem to be too eager to use both together. Why do you think that is?
评论 #7396141 未加载
评论 #7396146 未加载
bdg大约 11 年前
I find the architecture of ng fits a vast number of projects I work on very elegantly, however, I feel like I am learning to walk all over again.Things I could do in a day take me a week to learn, but I feel like my learning is progressing fast enough that I will be skilled at its use in a week.
otikik大约 11 年前
Am I the only one who can&#x27;t stand Angular simply because of its naming?