Skip to content

Commit

Permalink
docs(showHideWhen): update API docs for showWhen/hideWhen
Browse files Browse the repository at this point in the history
include links to the platform API docs and a little more information on
the directives

closes ionic-team/ionic-site#503
  • Loading branch information
brandyscarney committed Apr 18, 2016
1 parent cef019c commit 370054a
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions ionic/components/show-hide-when/show-hide-when.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,15 @@ export class DisplayWhen {
* @description
* The `showWhen` attribute takes a string that represents a platform or screen orientation.
* The element the attribute is added to will only be shown when that platform or screen orientation is active.
* Complements the [hideWhen attribute](../HideWhen).
*
* Complements the [hideWhen attribute](../HideWhen). If the `showWhen` attribute is used on an
* element that also has the `hideWhen` attribute, the element will not show if `hideWhen` evaluates
* to `true` or `showWhen` evaluates to `false`. If the `hidden` attribute is also added, the element
* will not show if `hidden` evaluates to `true`.
*
* View the [Platform API docs](../../platform/Platform) for more information on the different
* platforms you can use.
*
* @usage
* ```html
* <div showWhen="android">
Expand All @@ -87,6 +95,7 @@ export class DisplayWhen {
* ```
* @demo /docs/v2/demos/show-when/
* @see {@link ../HideWhen HideWhen API Docs}
* @see {@link ../../platform/Platform Platform API Docs}
*/
@Directive({
selector: '[showWhen]',
Expand All @@ -111,7 +120,15 @@ export class ShowWhen extends DisplayWhen {
* @description
* The `hideWhen` attribute takes a string that represents a plaform or screen orientation.
* The element the attribute is added to will only be hidden when that platform or screen orientation is active.
* Complements the [showWhen attribute](../ShowWhen).
*
* Complements the [showWhen attribute](../ShowWhen). If the `hideWhen` attribute is used on an
* element that also has the `showWhen` attribute, the element will not show if `hideWhen` evaluates
* to `true` or `showWhen` evaluates to `false`. If the `hidden` attribute is also added, the element
* will not show if `hidden` evaluates to `true`.
*
* View the [Platform API docs](../../platform/Platform) for more information on the different
* platforms you can use.
*
* @usage
* ```html
* <div hideWhen="android">
Expand All @@ -137,7 +154,8 @@ export class ShowWhen extends DisplayWhen {
*
* @demo /docs/v2/demos/hide-when/
* @see {@link ../ShowWhen ShowWhen API Docs}
*/
* @see {@link ../../platform/Platform Platform API Docs}
*/
@Directive({
selector: '[hideWhen]',
host: {
Expand Down

0 comments on commit 370054a

Please sign in to comment.