-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
915f6cf
commit 7fa36d6
Showing
34 changed files
with
2,054 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
angular/demo/bootstrap/src/app/samples/slider/ticks.route.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import {SliderComponent} from '@agnos-ui/angular-bootstrap'; | ||
import {Component, effect, signal} from '@angular/core'; | ||
import {FormControl, FormsModule, ReactiveFormsModule} from '@angular/forms'; | ||
|
||
@Component({ | ||
imports: [SliderComponent, ReactiveFormsModule, FormsModule], | ||
template: ` | ||
<h2>Ticks as steps</h2> | ||
<div auSlider auMin="0" auMax="100" auStepSize="25" [formControl]="sliderRangeControl" auShowTicks></div> | ||
<div class="form-check form-switch"> | ||
<input class="form-check-input" type="checkbox" role="switch" id="disabled" [(ngModel)]="disabledToggle" /> | ||
<label class="form-check-label" for="disabled">Disabled</label> | ||
</div> | ||
<h2>With intermediate steps</h2> | ||
<div auSlider auMin="0" auMax="100" auStepSize="1" [formControl]="sliderControl" auShowTicks auTickInterval="25"></div> | ||
<br /> | ||
<h2>Without tick labels</h2> | ||
<div auSlider auMin="0" auMax="100" auStepSize="25" [formControl]="sliderRangeControlLabels" auShowTicks auShowTickValues="false"></div> | ||
<p>If <code>showTickValues</code> is set to <code>false</code> the min/max/current label display is automatically put to <code>true</code></p> | ||
`, | ||
}) | ||
export default class TicksSliderComponent { | ||
readonly sliderControl = new FormControl([30]); | ||
|
||
readonly sliderRangeControl = new FormControl([30, 70]); | ||
readonly disabledToggle = signal(false); | ||
|
||
readonly sliderRangeControlLabels = new FormControl([30, 70]); | ||
|
||
constructor() { | ||
effect(() => { | ||
if (this.disabledToggle()) { | ||
this.sliderRangeControl.disable(); | ||
} else { | ||
this.sliderRangeControl.enable(); | ||
} | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.