diff --git a/demos/src/hide-when/app.module.ts b/demos/src/hide-when/app.module.ts new file mode 100644 index 0000000000..c521eef899 --- /dev/null +++ b/demos/src/hide-when/app.module.ts @@ -0,0 +1,32 @@ +import { Component, NgModule } from '@angular/core'; +import { IonicApp, IonicModule } from '../../ionic-angular'; + + +@Component({ + templateUrl: 'page.html' +}) +export class ApiDemoPage {} + + +@Component({ + template: '' +}) +export class ApiDemoApp { + root = ApiDemoPage; +} + + +@NgModule({ + declarations: [ + ApiDemoApp, + ApiDemoPage + ], + imports: [ + IonicModule.forRoot(ApiDemoApp) + ], + bootstrap: [IonicApp], + entryComponents: [ + ApiDemoPage + ] +}) +export class AppModule {} diff --git a/demos/src/hide-when/page.html b/demos/src/hide-when/page.html new file mode 100644 index 0000000000..70590aa843 --- /dev/null +++ b/demos/src/hide-when/page.html @@ -0,0 +1,61 @@ + + + + HideWhen + + + + + + + +
Hide Icon Per Platform
+

In this example we're using the hideWhen directive to decide whether to hide an icon based on the platform.

+ + + + + + + + <ion-icon name="logo-apple" hideWhen="android,windows"></ion-icon> + + + + + + + + <ion-icon name="logo-android" hideWhen="ios,windows"></ion-icon> + + + + + + + + <ion-icon name="logo-windows" hideWhen="ios,android"></ion-icon> + + + + +
+ +