Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

171
Views
How to show the dropdown list based on the picklist values

I have an angular application in that I have to show the dropdown list based on the picklist values.

.service.ts

 public getLists() {
    let baseUrl = `/endpoint`;
    this._restfulService
      .restfulGetData(baseUrl)
      
      .subscribe(
        (LookupData: LookupData) => {
          if (LookupData) {
            this.option1data = LookupData.option1Data;
            this.option2data = LookupData.option2Data;
            this.option3data = LookupData.option3Data;
            this.option4data = LookupData.option4Data;
            
 }
        },
        (err) => {
          console.error(err);
        }
      );
  }

.component.html

 <div class="row">
          <div class="form-group">
            <div class="col-sm-3">
              <label for="action"> <b>Category</b></label>
            </div>
            <div class="col-sm-7">
              <select>
               
                <option value="" disabled [selected]="true"></option>
                <option>option1</option>
                <option>option2</option>
                <option>option3</option>
                <option>option4</option>
        </select>
            </div>
          </div>
        </div>

 <div class="row>
          <div class="form-group">
            <div class="col-sm-3>
              <label for="action"> <b>Lists</b></label>
            </div>
            <div class="col-sm-7">
              <select>
               <option value="" disabled [selected]="true"></option>
                <option>
                 
              //In this dropdown I have to show the lists based on the selection of picklists
                </option>
              </select>
            </div>
          </div>
        </div>

So In tha above code if I select option1 from the picklist I have to show the option1Data dropdownlist etc..

can anyone helpme on this

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

<div class="row">
  <div class="form-group">
    <div class="col-sm-3">
      <label for="action"> <b>Lists</b></label>
    </div>
    <div class="col-sm-7">
      <select>
        <option disabled selected="true">Select pick</option>
        <option *ngFor="let items of LookupData" [ngValue]="items.name">
          {{ items.name }}
        </option>
      </select>
    </div>
  </div>
</div>

please put the above code in the HTML file. Hope this code will helpful to you

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!