question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it possible to use it with Reactive Forms?

See original GitHub issue

Hi, i am trying to use it with reactive forms, but the initial value is not seted and we cannot update the value of the selectedSelectedAllocationIndex while move the spinner:

<div class="col-8" [formGroupName]="i">
    <ng5-slider [(value)]="allocation.get('selectedSelectedAllocationIndex').value"
                [manualRefresh]="manualRefresh"
                [options]="getSliderOptions(i)"></ng5-slider>
  </div>

It is better if i can simply add formControlName="selectedSelectedAllocationIndex", Like:

<div class="col-8" [formGroupName]="i">
    <ng5-slider formControlName="selectedSelectedAllocationIndex"
                [manualRefresh]="manualRefresh"
                [options]="getSliderOptions(i)"></ng5-slider>
  </div>

but it is not documented or not implemented. Any idea?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
piotrdzcommented, Nov 22, 2018

Thanks @mariusl-a. I haven’t used Angular reactive forms all that much. I read up on how it works behind scenes, and indeed, implementing ControlValueAccessor was the key to solving this.

I added support for reactive forms in current master and it will be available in next release.

0reactions
piotrdzcommented, Nov 25, 2018

Released in v1.1.7. Closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reactive forms - Angular
Reactive forms use an explicit and immutable approach to managing the state of a form at a given point in time. Each change...
Read more >
How To Use Reactive Forms in Angular - DigitalOcean
Angular provides two ways to work with forms: template-driven forms and reactive forms (also known as model-driven forms).
Read more >
Ultimate Guide on Reactive Forms in Angular - KnowledgeHut
Learn how to build forms in Angular in an explicit way directly in your component classes using reactive forms. See examples of reactive ......
Read more >
Angular Reactive Forms Example - TekTutorialsHub
To work with Reactive forms, we must import the ReactiveFormsModule . We usually import it in root module or in a shared module....
Read more >
Reactive Forms in Angular - Codemotion Magazine
Reactive forms are a form of dynamic form validation, where inputs and values are provided as streams of input values that can be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found