TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Little-known directives of Angular.js

72 pointsby d4vlxover 11 years ago

10 comments

kurtfunaiover 11 years ago
Thanks for the post - I regularly use a lot of these, and I&#x27;m a big fan of ng-bind attribute over the &lt;div&gt;{{ thing }}&lt;&#x2F;div&gt; approach.<p>Things that really caught my eye:<p>- ng-list: sounds very useful for user forms, tagging, etc<p>- ng-switch: I dont know how many times I&#x27;ve used ng-show to replicate this functionality. Thank you!
评论 #6684902 未加载
评论 #6684343 未加载
mmacover 11 years ago
ngPluralize - Handles pluralization scenarios cleanly in your view. No more &quot;var itemCountDesc = items.length + &#x27; Item&#x27; + items.length === 1 ? &#x27;&#x27; : &#x27;s&#x27;;&quot;
crucialfelixover 11 years ago
ui-view does indeed look quite interesting. but the description didn&#x27;t really explain it for me.<p>a simplified description is that its a router for multiple-panes. where different related states can make use of inheritance.<p><a href="http://txt.fliglio.com/2013/05/angularjs-state-management-with-ui-router/" rel="nofollow">http:&#x2F;&#x2F;txt.fliglio.com&#x2F;2013&#x2F;05&#x2F;angularjs-state-management-wi...</a><p><a href="http://jsfiddle.net/benschwartz/LhydD/" rel="nofollow">http:&#x2F;&#x2F;jsfiddle.net&#x2F;benschwartz&#x2F;LhydD&#x2F;</a>
评论 #6684528 未加载
altcognitoover 11 years ago
&gt; &quot;Angular performs validation of HTML5 input types out of the box.&quot;<p>I&#x27;m confused. What does angular have to do with this?
评论 #6683300 未加载
wmilover 11 years ago
ng-bind-html-unsafe has been removed in the latest release candidates, it won&#x27;t be in 1.2<p>So try not to get attached.
评论 #6683962 未加载
评论 #6684442 未加载
mcvover 11 years ago
I&#x27;ll be looking into ui-view. I need different view options.
metastewover 11 years ago
What does &quot;Flash Of Uncompiled Content&quot; means?
评论 #6683543 未加载
评论 #6683923 未加载
评论 #6683554 未加载
评论 #6685148 未加载
plus-over 11 years ago
Well, I didn&#x27;t even know about ng-cloak
评论 #6683035 未加载
jasdeepsinghover 11 years ago
ngBind was new for me today. Thank you!
ffrryuuover 11 years ago
ng-attr is very nice