aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive/booleanAttrs.js
diff options
context:
space:
mode:
authorDave Peticolas2013-09-22 13:03:05 -0700
committerPete Bacon Darwin2013-09-25 22:33:07 +0100
commit12ae60052f2850d8e325d1090e3b06c6620cdd36 (patch)
tree68cfd210b3ed2064360ca8e76c08556e419cb660 /src/ng/directive/booleanAttrs.js
parenteb5b422842fa09f58aa1c3eab020415cf93042f0 (diff)
downloadangular.js-12ae60052f2850d8e325d1090e3b06c6620cdd36.tar.bz2
docs(ngHref): fix formatting and clarify
Closes #4106
Diffstat (limited to 'src/ng/directive/booleanAttrs.js')
-rw-r--r--src/ng/directive/booleanAttrs.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ng/directive/booleanAttrs.js b/src/ng/directive/booleanAttrs.js
index ad7b4f3f..9ccb3977 100644
--- a/src/ng/directive/booleanAttrs.js
+++ b/src/ng/directive/booleanAttrs.js
@@ -6,13 +6,15 @@
* @restrict A
*
* @description
- * Using Angular markup like {{hash}} in an href attribute makes
- * the page open to a wrong URL, if the user clicks that link before
- * angular has a chance to replace the {{hash}} with actual URL, the
- * link will be broken and will most likely return a 404 error.
+ * Using Angular markup like `{{hash}}` in an href attribute will
+ * make the link go to the wrong URL if the user clicks it before
+ * Angular has a chance to replace the `{{hash}}` markup with its
+ * value. Until Angular replaces the markup the link will be broken
+ * and will most likely return a 404 error.
+ *
* The `ngHref` directive solves this problem.
*
- * The buggy way to write it:
+ * The wrong way to write it:
* <pre>
* <a href="http://www.gravatar.com/avatar/{{hash}}"/>
* </pre>
@@ -26,7 +28,8 @@
* @param {template} ngHref any string which can contain `{{}}` markup.
*
* @example
- * This example uses `link` variable inside `href` attribute:
+ * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes
+ * in links and their different behaviors:
<doc:example>
<doc:source>
<input ng-model="value" /><br />