- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
public destinationChanged(element: string): boolean {
if (Boolean(this.scope.newDestination)) {
if (element == "input") {
return true;
} else {
return false;
}
} else {
if (element == "select") {
return true;
} else {
return false;
}
}
}
Разметочка:
<div ng-show="controller.destinationChanged('select')">
<!---->
</div>
<div ng-show="controller.destinationChanged('input')">
<!---->
</div>
м?
<div ng-show="!newDestination">
<!---->
</div>
<div ng-show="newDestination">
<!---->
</div>