mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
docs(demos): remove attr from docs
This commit is contained in:
@ -1,17 +0,0 @@
|
|||||||
import {App} from 'ionic/ionic';
|
|
||||||
|
|
||||||
@App({
|
|
||||||
templateUrl: 'main.html'
|
|
||||||
})
|
|
||||||
|
|
||||||
class DemoApp {
|
|
||||||
|
|
||||||
constructor() {
|
|
||||||
this.isHidden = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
toggle() {
|
|
||||||
this.isHidden = !this.isHidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
|
|
||||||
<ion-toolbar>
|
|
||||||
<ion-title>attr</ion-title>
|
|
||||||
</ion-toolbar>
|
|
||||||
|
|
||||||
<ion-content padding style="text-align:center">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ion-row>
|
|
||||||
<ion-col>
|
|
||||||
<b>[attr.hidden]="isHidden ? '' : null"</b>
|
|
||||||
</ion-col>
|
|
||||||
</ion-row>
|
|
||||||
|
|
||||||
<ion-row>
|
|
||||||
<ion-col>
|
|
||||||
<b>isHidden:</b> {{isHidden}}
|
|
||||||
</ion-col>
|
|
||||||
</ion-row>
|
|
||||||
|
|
||||||
<ion-row>
|
|
||||||
<ion-col>
|
|
||||||
<ion-icon name="ionic" [attr.hidden]="isHidden ? '' : null" style="font-size: 52px; text-align: center;"></ion-icon>
|
|
||||||
</ion-col>
|
|
||||||
</ion-row>
|
|
||||||
|
|
||||||
<button (click)="toggle()">Toggle Icon</button>
|
|
||||||
|
|
||||||
</ion-content>
|
|
@ -66,15 +66,7 @@ export class IdRef {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Attr
|
* @private
|
||||||
* @description
|
|
||||||
* Attr allows you to dynamically add or remove an attribute based on the value of an expression or variable.
|
|
||||||
* @usage
|
|
||||||
* ```html
|
|
||||||
* // toggle the no-lines attributes based on whether isAndroid is true or false
|
|
||||||
* <ion-list [attr.no-lines]="isAndroid ? '' : null">
|
|
||||||
* ```
|
|
||||||
* @demo /docs/v2/demos/attr/
|
|
||||||
*/
|
*/
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[attr]'
|
selector: '[attr]'
|
||||||
|
Reference in New Issue
Block a user