6
6
*
7
7
* @description
8
8
* The `ngShow` directive shows or hides the given HTML element based on the expression
9
- * provided to the ngShow attribute. The element is shown or hidden by removing or adding
10
- * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined
9
+ * provided to the ` ngShow` attribute. The element is shown or hidden by removing or adding
10
+ * the `. ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined
11
11
* in AngularJS and sets the display style to none (using an !important flag).
12
12
* For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
13
13
*
19
19
* <div ng-show="myValue" class="ng-hide"></div>
20
20
* ```
21
21
*
22
- * When the ngShow expression evaluates to a falsy value then the ng-hide CSS class is added to the class
23
- * attribute on the element causing it to become hidden. When truthy, the ng-hide CSS class is removed
22
+ * When the ` ngShow` expression evaluates to a falsy value then the `. ng-hide` CSS class is added to the class
23
+ * attribute on the element causing it to become hidden. When truthy, the `. ng-hide` CSS class is removed
24
24
* from the element causing the element not to appear hidden.
25
25
*
26
26
* ## Why is !important used?
27
27
*
28
- * You may be wondering why !important is used for the .ng-hide CSS class. This is because the `.ng-hide` selector
28
+ * You may be wondering why !important is used for the ` .ng-hide` CSS class. This is because the `.ng-hide` selector
29
29
* can be easily overridden by heavier selectors. For example, something as simple
30
30
* as changing the display style on a HTML list item would make hidden elements appear visible.
31
31
* This also becomes a bigger issue when dealing with CSS frameworks.
34
34
* specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the
35
35
* styling to change how to hide an element then it is just a matter of using !important in their own CSS code.
36
36
*
37
- * ### Overriding .ng-hide
37
+ * ### Overriding ` .ng-hide`
38
38
*
39
39
* By default, the `.ng-hide` class will style the element with `display:none!important`. If you wish to change
40
40
* the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`
52
52
*
53
53
* By default you don't need to override in CSS anything and the animations will work around the display style.
54
54
*
55
- * ## A note about animations with ngShow
55
+ * ## A note about animations with ` ngShow`
56
56
*
57
57
* Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression
58
58
* is true and false. This system works like the animation system present with ngClass except that
85
85
* property to block during animation states--ngAnimate will handle the style toggling automatically for you.
86
86
*
87
87
* @animations
88
- * addClass: .ng-hide - happens after the ngShow expression evaluates to a truthy value and the just before contents are set to visible
89
- * removeClass: .ng-hide - happens after the ngShow expression evaluates to a non truthy value and just before the contents are set to hidden
88
+ * addClass: ` .ng-hide` - happens after the ` ngShow` expression evaluates to a truthy value and the just before contents are set to visible
89
+ * removeClass: ` .ng-hide` - happens after the ` ngShow` expression evaluates to a non truthy value and just before the contents are set to hidden
90
90
*
91
91
* @element ANY
92
92
* @param {expression } ngShow If the {@link guide/expression expression} is truthy
@@ -174,7 +174,7 @@ var ngShowDirective = ['$animate', function($animate) {
174
174
*
175
175
* @description
176
176
* The `ngHide` directive shows or hides the given HTML element based on the expression
177
- * provided to the ngHide attribute. The element is shown or hidden by removing or adding
177
+ * provided to the ` ngHide` attribute. The element is shown or hidden by removing or adding
178
178
* the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined
179
179
* in AngularJS and sets the display style to none (using an !important flag).
180
180
* For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
@@ -187,13 +187,13 @@ var ngShowDirective = ['$animate', function($animate) {
187
187
* <div ng-hide="myValue"></div>
188
188
* ```
189
189
*
190
- * When the ngHide expression evaluates to a truthy value then the .ng-hide CSS class is added to the class
191
- * attribute on the element causing it to become hidden. When falsy, the ng-hide CSS class is removed
190
+ * When the ` ngHide` expression evaluates to a truthy value then the ` .ng-hide` CSS class is added to the class
191
+ * attribute on the element causing it to become hidden. When falsy, the `. ng-hide` CSS class is removed
192
192
* from the element causing the element not to appear hidden.
193
193
*
194
194
* ## Why is !important used?
195
195
*
196
- * You may be wondering why !important is used for the .ng-hide CSS class. This is because the `.ng-hide` selector
196
+ * You may be wondering why !important is used for the ` .ng-hide` CSS class. This is because the `.ng-hide` selector
197
197
* can be easily overridden by heavier selectors. For example, something as simple
198
198
* as changing the display style on a HTML list item would make hidden elements appear visible.
199
199
* This also becomes a bigger issue when dealing with CSS frameworks.
@@ -202,7 +202,7 @@ var ngShowDirective = ['$animate', function($animate) {
202
202
* specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the
203
203
* styling to change how to hide an element then it is just a matter of using !important in their own CSS code.
204
204
*
205
- * ### Overriding .ng-hide
205
+ * ### Overriding ` .ng-hide`
206
206
*
207
207
* By default, the `.ng-hide` class will style the element with `display:none!important`. If you wish to change
208
208
* the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`
@@ -220,7 +220,7 @@ var ngShowDirective = ['$animate', function($animate) {
220
220
*
221
221
* By default you don't need to override in CSS anything and the animations will work around the display style.
222
222
*
223
- * ## A note about animations with ngHide
223
+ * ## A note about animations with ` ngHide`
224
224
*
225
225
* Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression
226
226
* is true and false. This system works like the animation system present with ngClass, except that the `.ng-hide`
@@ -244,8 +244,8 @@ var ngShowDirective = ['$animate', function($animate) {
244
244
* property to block during animation states--ngAnimate will handle the style toggling automatically for you.
245
245
*
246
246
* @animations
247
- * removeClass: .ng-hide - happens after the ngHide expression evaluates to a truthy value and just before the contents are set to hidden
248
- * addClass: .ng-hide - happens after the ngHide expression evaluates to a non truthy value and just before the contents are set to visible
247
+ * removeClass: ` .ng-hide` - happens after the ` ngHide` expression evaluates to a truthy value and just before the contents are set to hidden
248
+ * addClass: ` .ng-hide` - happens after the ` ngHide` expression evaluates to a non truthy value and just before the contents are set to visible
249
249
*
250
250
* @element ANY
251
251
* @param {expression } ngHide If the {@link guide/expression expression} is truthy then
0 commit comments