How To select any quantity and it's value get's changed?How to store and pass the value of Mat-Select using ngModelHow to change an element's class with JavaScript?Change the selected value of a drop-down list with jQueryHow can I know which radio button is selected via jQuery?How can I get query string values in JavaScript?How can I select an element with multiple classes in jQuery?Get selected value in dropdown list using JavaScriptHow can I select an element by name with jQuery?How to style a <select> dropdown with only CSS?How can I set the default value for an HTML <select> element?How do I make a placeholder for a 'select' box?

What would be the ideal melee weapon made of "Phase Metal"?

Cutting machine can't read vectors with strokes

I quit, and boss offered me 3 month "grace period" where I could still come back

A DVR algebra with weird automorphisms

TikZ Can I draw an arrow by specifying the initial point, direction, and length?

Why did my rum cake turn black?

Why does the autopilot disengage even when it does not receive pilot input?

Cubic programming and beyond?

Interpreting the word "randomly"

Ambiguous sentences: How to tell when they need fixing?

Can I intentionally omit previous work experience or pretend it doesn't exist when applying for jobs?

Draw 3D Cubes around centre

How to check the quality of an audio sample?

Alternatives to using writing paper for writing practice

Help with understanding nuances of extremely popular Kyoto-ben (?) tweet

As a DM, how to avoid unconscious metagaming when dealing with a high AC character?

Can you negate disadvantage on throwing a net by using the Lunging Attack maneuver of the Battle Master fighter?

Are there any double stars that I can actually see orbit each other?

Why do they not say "The Baby"

Why doesn't the Lars family (and thus Luke) speak Huttese as their first language?

Why limit to revolvers?

Where is my understanding of TikZ styles wrong?

Why hasn't the U.S. government paid war reparations to any country it attacked?

Fix /dev/sdb after using dd with no device inserted



How To select any quantity and it's value get's changed?


How to store and pass the value of Mat-Select using ngModelHow to change an element's class with JavaScript?Change the selected value of a drop-down list with jQueryHow can I know which radio button is selected via jQuery?How can I get query string values in JavaScript?How can I select an element with multiple classes in jQuery?Get selected value in dropdown list using JavaScriptHow can I select an element by name with jQuery?How to style a <select> dropdown with only CSS?How can I set the default value for an HTML <select> element?How do I make a placeholder for a 'select' box?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I am new to ionic 3 and want to know about the code please help me out guy's.
I want to select any item and it's value get's changed subtotal may reflect's to it output.



cart.ts



private _values1 = [" 1 ", "2", " 3 "," 4 "," 5 "," 6 "];

firstDropDownChanged(_values1: any)

this.currentPrice = (parseInt(this.product.subtotal) * this._values1);
console.log(this.currentPrice);
this.product.subtotal =this.currentPrice;
console.log(this.product._values1);



cart.html



 <span style="font-size: 14px !important;">Qty:</span> 
<select class="sel" (change)="firstDropDownChanged()">
<option *ngFor='let v of _values1'> v </option>
</select>









share|improve this question
























  • you are not passing the parameter (_values1: any)

    – Pranav C Balan
    Mar 26 at 5:39












  • you forgot to pass parameter in firstDropDownChanged

    – TheParam
    Mar 26 at 5:39











  • explain me i don't know actualy what am i doing..?it's emergency to be submit today..!

    – jay shah
    Mar 26 at 5:40











  • use (ionChange)="abc($event)" .

    – Najam us saqib
    Mar 26 at 5:47











  • The answer provided code below will do what you want. You are missing the parameter that's being passed in. Also your emergency != our emergency.

    – penleychan
    Mar 26 at 5:53

















1















I am new to ionic 3 and want to know about the code please help me out guy's.
I want to select any item and it's value get's changed subtotal may reflect's to it output.



cart.ts



private _values1 = [" 1 ", "2", " 3 "," 4 "," 5 "," 6 "];

firstDropDownChanged(_values1: any)

this.currentPrice = (parseInt(this.product.subtotal) * this._values1);
console.log(this.currentPrice);
this.product.subtotal =this.currentPrice;
console.log(this.product._values1);



cart.html



 <span style="font-size: 14px !important;">Qty:</span> 
<select class="sel" (change)="firstDropDownChanged()">
<option *ngFor='let v of _values1'> v </option>
</select>









share|improve this question
























  • you are not passing the parameter (_values1: any)

    – Pranav C Balan
    Mar 26 at 5:39












  • you forgot to pass parameter in firstDropDownChanged

    – TheParam
    Mar 26 at 5:39











  • explain me i don't know actualy what am i doing..?it's emergency to be submit today..!

    – jay shah
    Mar 26 at 5:40











  • use (ionChange)="abc($event)" .

    – Najam us saqib
    Mar 26 at 5:47











  • The answer provided code below will do what you want. You are missing the parameter that's being passed in. Also your emergency != our emergency.

    – penleychan
    Mar 26 at 5:53













1












1








1








I am new to ionic 3 and want to know about the code please help me out guy's.
I want to select any item and it's value get's changed subtotal may reflect's to it output.



cart.ts



private _values1 = [" 1 ", "2", " 3 "," 4 "," 5 "," 6 "];

firstDropDownChanged(_values1: any)

this.currentPrice = (parseInt(this.product.subtotal) * this._values1);
console.log(this.currentPrice);
this.product.subtotal =this.currentPrice;
console.log(this.product._values1);



cart.html



 <span style="font-size: 14px !important;">Qty:</span> 
<select class="sel" (change)="firstDropDownChanged()">
<option *ngFor='let v of _values1'> v </option>
</select>









share|improve this question
















I am new to ionic 3 and want to know about the code please help me out guy's.
I want to select any item and it's value get's changed subtotal may reflect's to it output.



cart.ts



private _values1 = [" 1 ", "2", " 3 "," 4 "," 5 "," 6 "];

firstDropDownChanged(_values1: any)

this.currentPrice = (parseInt(this.product.subtotal) * this._values1);
console.log(this.currentPrice);
this.product.subtotal =this.currentPrice;
console.log(this.product._values1);



cart.html



 <span style="font-size: 14px !important;">Qty:</span> 
<select class="sel" (change)="firstDropDownChanged()">
<option *ngFor='let v of _values1'> v </option>
</select>






javascript html angular typescript ionic-framework






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 10:46









Martijn Pieters

746k158 gold badges2688 silver badges2418 bronze badges




746k158 gold badges2688 silver badges2418 bronze badges










asked Mar 26 at 5:37









jay shahjay shah

96 bronze badges




96 bronze badges












  • you are not passing the parameter (_values1: any)

    – Pranav C Balan
    Mar 26 at 5:39












  • you forgot to pass parameter in firstDropDownChanged

    – TheParam
    Mar 26 at 5:39











  • explain me i don't know actualy what am i doing..?it's emergency to be submit today..!

    – jay shah
    Mar 26 at 5:40











  • use (ionChange)="abc($event)" .

    – Najam us saqib
    Mar 26 at 5:47











  • The answer provided code below will do what you want. You are missing the parameter that's being passed in. Also your emergency != our emergency.

    – penleychan
    Mar 26 at 5:53

















  • you are not passing the parameter (_values1: any)

    – Pranav C Balan
    Mar 26 at 5:39












  • you forgot to pass parameter in firstDropDownChanged

    – TheParam
    Mar 26 at 5:39











  • explain me i don't know actualy what am i doing..?it's emergency to be submit today..!

    – jay shah
    Mar 26 at 5:40











  • use (ionChange)="abc($event)" .

    – Najam us saqib
    Mar 26 at 5:47











  • The answer provided code below will do what you want. You are missing the parameter that's being passed in. Also your emergency != our emergency.

    – penleychan
    Mar 26 at 5:53
















you are not passing the parameter (_values1: any)

– Pranav C Balan
Mar 26 at 5:39






you are not passing the parameter (_values1: any)

– Pranav C Balan
Mar 26 at 5:39














you forgot to pass parameter in firstDropDownChanged

– TheParam
Mar 26 at 5:39





you forgot to pass parameter in firstDropDownChanged

– TheParam
Mar 26 at 5:39













explain me i don't know actualy what am i doing..?it's emergency to be submit today..!

– jay shah
Mar 26 at 5:40





explain me i don't know actualy what am i doing..?it's emergency to be submit today..!

– jay shah
Mar 26 at 5:40













use (ionChange)="abc($event)" .

– Najam us saqib
Mar 26 at 5:47





use (ionChange)="abc($event)" .

– Najam us saqib
Mar 26 at 5:47













The answer provided code below will do what you want. You are missing the parameter that's being passed in. Also your emergency != our emergency.

– penleychan
Mar 26 at 5:53





The answer provided code below will do what you want. You are missing the parameter that's being passed in. Also your emergency != our emergency.

– penleychan
Mar 26 at 5:53












4 Answers
4






active

oldest

votes


















1














You can use 2-way data-binding using [(ngModel)] as



<select class="sel" (change)="firstDropDownChanged()" [(ngModel)]="selectedValue">
<option *ngFor='let v of _values1' [ngValue]="v"> v </option>
</select>


So, on every change of option, the current value of selected option will be in selectedValue variable. Use in .ts file as



firstDropDownChanged() 
this.currentPrice = this.product.subtotal * this.selectedValue;
console.log(this.currentPrice);
this.product.subtotal =this.currentPrice;



Stackblitz Demo using ngModel






share|improve this answer























  • thanx a lot it really worked.!

    – jay shah
    Mar 26 at 6:36











  • @jayshah glad, it helped, please upvote and accept the answer as well.

    – Abhishek Kumar
    Mar 26 at 6:37











  • yes,sure @abhishek kumar..!

    – jay shah
    Mar 26 at 6:38











  • @jayshah please, and thank you

    – Abhishek Kumar
    Mar 26 at 7:02


















0














Try this in TS



 this.currentPrice = this._values1.map((value: number) => 
return parseInt(this.product.subtotal) * value
);


And in HTML add below in Select



(change)="firstDropDownChanged($event.target.value)"





share|improve this answer






























    0














    you can try like this i hope it helps you out



    TS



    currentPrice: number = 0;
    private _values1 = [" 1 ", "2", " 3 "," 4 "," 5 "," 6 "];

    firstDropDownChanged(data: any)

    this.currentPrice = +this.product.subtotal * +data.target.value;
    console.log(this.currentPrice);
    this.product.subtotal = this.currentPrice;



    HTML



     <select class="sel" (change)="firstDropDownChanged($event)">
    <option *ngFor='let v of _values1'> v </option>
    </select>


    let me know if it is working or not






    share|improve this answer






























      0














      Here you need to pass the selected value using $event.target.value in your firstDropDownChanged() method like below



      component.ts



      private _values1 = [1, 2,3, 4, 5, 6];
      currentPrice = 10;
      product =
      subtotal : 10,
      _values1 : 1

      firstDropDownChanged(_values1: any)
      this.currentPrice = this.product.subtotal * _values1;
      console.log(this.currentPrice);
      this.product.subtotal =this.currentPrice;
      console.log(this.product._values1);




      component.html



       <select class="sel" (change)="firstDropDownChanged($event.target.value)">
      <option *ngFor='let v of _values1'> v </option>
      </select>


      Here is stackblitz link



      Hope this will help!






      share|improve this answer

























      • sorry i tried it before it's not happening..!

        – jay shah
        Mar 26 at 5:41











      • what error you are getting. please check the stackblitz

        – TheParam
        Mar 26 at 5:43











      • i want to multiply each index and want to show it's data to the page

        – jay shah
        Mar 26 at 5:47











      • Please share your product object

        – TheParam
        Mar 26 at 5:50











      • i have shared all code to be perfromed above ..

        – jay shah
        Mar 26 at 5:52













      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55350480%2fhow-to-select-any-quantity-and-its-value-gets-changed%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      You can use 2-way data-binding using [(ngModel)] as



      <select class="sel" (change)="firstDropDownChanged()" [(ngModel)]="selectedValue">
      <option *ngFor='let v of _values1' [ngValue]="v"> v </option>
      </select>


      So, on every change of option, the current value of selected option will be in selectedValue variable. Use in .ts file as



      firstDropDownChanged() 
      this.currentPrice = this.product.subtotal * this.selectedValue;
      console.log(this.currentPrice);
      this.product.subtotal =this.currentPrice;



      Stackblitz Demo using ngModel






      share|improve this answer























      • thanx a lot it really worked.!

        – jay shah
        Mar 26 at 6:36











      • @jayshah glad, it helped, please upvote and accept the answer as well.

        – Abhishek Kumar
        Mar 26 at 6:37











      • yes,sure @abhishek kumar..!

        – jay shah
        Mar 26 at 6:38











      • @jayshah please, and thank you

        – Abhishek Kumar
        Mar 26 at 7:02















      1














      You can use 2-way data-binding using [(ngModel)] as



      <select class="sel" (change)="firstDropDownChanged()" [(ngModel)]="selectedValue">
      <option *ngFor='let v of _values1' [ngValue]="v"> v </option>
      </select>


      So, on every change of option, the current value of selected option will be in selectedValue variable. Use in .ts file as



      firstDropDownChanged() 
      this.currentPrice = this.product.subtotal * this.selectedValue;
      console.log(this.currentPrice);
      this.product.subtotal =this.currentPrice;



      Stackblitz Demo using ngModel






      share|improve this answer























      • thanx a lot it really worked.!

        – jay shah
        Mar 26 at 6:36











      • @jayshah glad, it helped, please upvote and accept the answer as well.

        – Abhishek Kumar
        Mar 26 at 6:37











      • yes,sure @abhishek kumar..!

        – jay shah
        Mar 26 at 6:38











      • @jayshah please, and thank you

        – Abhishek Kumar
        Mar 26 at 7:02













      1












      1








      1







      You can use 2-way data-binding using [(ngModel)] as



      <select class="sel" (change)="firstDropDownChanged()" [(ngModel)]="selectedValue">
      <option *ngFor='let v of _values1' [ngValue]="v"> v </option>
      </select>


      So, on every change of option, the current value of selected option will be in selectedValue variable. Use in .ts file as



      firstDropDownChanged() 
      this.currentPrice = this.product.subtotal * this.selectedValue;
      console.log(this.currentPrice);
      this.product.subtotal =this.currentPrice;



      Stackblitz Demo using ngModel






      share|improve this answer













      You can use 2-way data-binding using [(ngModel)] as



      <select class="sel" (change)="firstDropDownChanged()" [(ngModel)]="selectedValue">
      <option *ngFor='let v of _values1' [ngValue]="v"> v </option>
      </select>


      So, on every change of option, the current value of selected option will be in selectedValue variable. Use in .ts file as



      firstDropDownChanged() 
      this.currentPrice = this.product.subtotal * this.selectedValue;
      console.log(this.currentPrice);
      this.product.subtotal =this.currentPrice;



      Stackblitz Demo using ngModel







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Mar 26 at 6:13









      Abhishek KumarAbhishek Kumar

      1,5934 silver badges18 bronze badges




      1,5934 silver badges18 bronze badges












      • thanx a lot it really worked.!

        – jay shah
        Mar 26 at 6:36











      • @jayshah glad, it helped, please upvote and accept the answer as well.

        – Abhishek Kumar
        Mar 26 at 6:37











      • yes,sure @abhishek kumar..!

        – jay shah
        Mar 26 at 6:38











      • @jayshah please, and thank you

        – Abhishek Kumar
        Mar 26 at 7:02

















      • thanx a lot it really worked.!

        – jay shah
        Mar 26 at 6:36











      • @jayshah glad, it helped, please upvote and accept the answer as well.

        – Abhishek Kumar
        Mar 26 at 6:37











      • yes,sure @abhishek kumar..!

        – jay shah
        Mar 26 at 6:38











      • @jayshah please, and thank you

        – Abhishek Kumar
        Mar 26 at 7:02
















      thanx a lot it really worked.!

      – jay shah
      Mar 26 at 6:36





      thanx a lot it really worked.!

      – jay shah
      Mar 26 at 6:36













      @jayshah glad, it helped, please upvote and accept the answer as well.

      – Abhishek Kumar
      Mar 26 at 6:37





      @jayshah glad, it helped, please upvote and accept the answer as well.

      – Abhishek Kumar
      Mar 26 at 6:37













      yes,sure @abhishek kumar..!

      – jay shah
      Mar 26 at 6:38





      yes,sure @abhishek kumar..!

      – jay shah
      Mar 26 at 6:38













      @jayshah please, and thank you

      – Abhishek Kumar
      Mar 26 at 7:02





      @jayshah please, and thank you

      – Abhishek Kumar
      Mar 26 at 7:02













      0














      Try this in TS



       this.currentPrice = this._values1.map((value: number) => 
      return parseInt(this.product.subtotal) * value
      );


      And in HTML add below in Select



      (change)="firstDropDownChanged($event.target.value)"





      share|improve this answer



























        0














        Try this in TS



         this.currentPrice = this._values1.map((value: number) => 
        return parseInt(this.product.subtotal) * value
        );


        And in HTML add below in Select



        (change)="firstDropDownChanged($event.target.value)"





        share|improve this answer

























          0












          0








          0







          Try this in TS



           this.currentPrice = this._values1.map((value: number) => 
          return parseInt(this.product.subtotal) * value
          );


          And in HTML add below in Select



          (change)="firstDropDownChanged($event.target.value)"





          share|improve this answer













          Try this in TS



           this.currentPrice = this._values1.map((value: number) => 
          return parseInt(this.product.subtotal) * value
          );


          And in HTML add below in Select



          (change)="firstDropDownChanged($event.target.value)"






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 26 at 5:56









          Seba CherianSeba Cherian

          8791 silver badge14 bronze badges




          8791 silver badge14 bronze badges





















              0














              you can try like this i hope it helps you out



              TS



              currentPrice: number = 0;
              private _values1 = [" 1 ", "2", " 3 "," 4 "," 5 "," 6 "];

              firstDropDownChanged(data: any)

              this.currentPrice = +this.product.subtotal * +data.target.value;
              console.log(this.currentPrice);
              this.product.subtotal = this.currentPrice;



              HTML



               <select class="sel" (change)="firstDropDownChanged($event)">
              <option *ngFor='let v of _values1'> v </option>
              </select>


              let me know if it is working or not






              share|improve this answer



























                0














                you can try like this i hope it helps you out



                TS



                currentPrice: number = 0;
                private _values1 = [" 1 ", "2", " 3 "," 4 "," 5 "," 6 "];

                firstDropDownChanged(data: any)

                this.currentPrice = +this.product.subtotal * +data.target.value;
                console.log(this.currentPrice);
                this.product.subtotal = this.currentPrice;



                HTML



                 <select class="sel" (change)="firstDropDownChanged($event)">
                <option *ngFor='let v of _values1'> v </option>
                </select>


                let me know if it is working or not






                share|improve this answer

























                  0












                  0








                  0







                  you can try like this i hope it helps you out



                  TS



                  currentPrice: number = 0;
                  private _values1 = [" 1 ", "2", " 3 "," 4 "," 5 "," 6 "];

                  firstDropDownChanged(data: any)

                  this.currentPrice = +this.product.subtotal * +data.target.value;
                  console.log(this.currentPrice);
                  this.product.subtotal = this.currentPrice;



                  HTML



                   <select class="sel" (change)="firstDropDownChanged($event)">
                  <option *ngFor='let v of _values1'> v </option>
                  </select>


                  let me know if it is working or not






                  share|improve this answer













                  you can try like this i hope it helps you out



                  TS



                  currentPrice: number = 0;
                  private _values1 = [" 1 ", "2", " 3 "," 4 "," 5 "," 6 "];

                  firstDropDownChanged(data: any)

                  this.currentPrice = +this.product.subtotal * +data.target.value;
                  console.log(this.currentPrice);
                  this.product.subtotal = this.currentPrice;



                  HTML



                   <select class="sel" (change)="firstDropDownChanged($event)">
                  <option *ngFor='let v of _values1'> v </option>
                  </select>


                  let me know if it is working or not







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 26 at 6:04









                  Yash RamiYash Rami

                  1,2925 silver badges13 bronze badges




                  1,2925 silver badges13 bronze badges





















                      0














                      Here you need to pass the selected value using $event.target.value in your firstDropDownChanged() method like below



                      component.ts



                      private _values1 = [1, 2,3, 4, 5, 6];
                      currentPrice = 10;
                      product =
                      subtotal : 10,
                      _values1 : 1

                      firstDropDownChanged(_values1: any)
                      this.currentPrice = this.product.subtotal * _values1;
                      console.log(this.currentPrice);
                      this.product.subtotal =this.currentPrice;
                      console.log(this.product._values1);




                      component.html



                       <select class="sel" (change)="firstDropDownChanged($event.target.value)">
                      <option *ngFor='let v of _values1'> v </option>
                      </select>


                      Here is stackblitz link



                      Hope this will help!






                      share|improve this answer

























                      • sorry i tried it before it's not happening..!

                        – jay shah
                        Mar 26 at 5:41











                      • what error you are getting. please check the stackblitz

                        – TheParam
                        Mar 26 at 5:43











                      • i want to multiply each index and want to show it's data to the page

                        – jay shah
                        Mar 26 at 5:47











                      • Please share your product object

                        – TheParam
                        Mar 26 at 5:50











                      • i have shared all code to be perfromed above ..

                        – jay shah
                        Mar 26 at 5:52















                      0














                      Here you need to pass the selected value using $event.target.value in your firstDropDownChanged() method like below



                      component.ts



                      private _values1 = [1, 2,3, 4, 5, 6];
                      currentPrice = 10;
                      product =
                      subtotal : 10,
                      _values1 : 1

                      firstDropDownChanged(_values1: any)
                      this.currentPrice = this.product.subtotal * _values1;
                      console.log(this.currentPrice);
                      this.product.subtotal =this.currentPrice;
                      console.log(this.product._values1);




                      component.html



                       <select class="sel" (change)="firstDropDownChanged($event.target.value)">
                      <option *ngFor='let v of _values1'> v </option>
                      </select>


                      Here is stackblitz link



                      Hope this will help!






                      share|improve this answer

























                      • sorry i tried it before it's not happening..!

                        – jay shah
                        Mar 26 at 5:41











                      • what error you are getting. please check the stackblitz

                        – TheParam
                        Mar 26 at 5:43











                      • i want to multiply each index and want to show it's data to the page

                        – jay shah
                        Mar 26 at 5:47











                      • Please share your product object

                        – TheParam
                        Mar 26 at 5:50











                      • i have shared all code to be perfromed above ..

                        – jay shah
                        Mar 26 at 5:52













                      0












                      0








                      0







                      Here you need to pass the selected value using $event.target.value in your firstDropDownChanged() method like below



                      component.ts



                      private _values1 = [1, 2,3, 4, 5, 6];
                      currentPrice = 10;
                      product =
                      subtotal : 10,
                      _values1 : 1

                      firstDropDownChanged(_values1: any)
                      this.currentPrice = this.product.subtotal * _values1;
                      console.log(this.currentPrice);
                      this.product.subtotal =this.currentPrice;
                      console.log(this.product._values1);




                      component.html



                       <select class="sel" (change)="firstDropDownChanged($event.target.value)">
                      <option *ngFor='let v of _values1'> v </option>
                      </select>


                      Here is stackblitz link



                      Hope this will help!






                      share|improve this answer















                      Here you need to pass the selected value using $event.target.value in your firstDropDownChanged() method like below



                      component.ts



                      private _values1 = [1, 2,3, 4, 5, 6];
                      currentPrice = 10;
                      product =
                      subtotal : 10,
                      _values1 : 1

                      firstDropDownChanged(_values1: any)
                      this.currentPrice = this.product.subtotal * _values1;
                      console.log(this.currentPrice);
                      this.product.subtotal =this.currentPrice;
                      console.log(this.product._values1);




                      component.html



                       <select class="sel" (change)="firstDropDownChanged($event.target.value)">
                      <option *ngFor='let v of _values1'> v </option>
                      </select>


                      Here is stackblitz link



                      Hope this will help!







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Mar 26 at 6:06

























                      answered Mar 26 at 5:41









                      TheParamTheParam

                      5,4651 gold badge19 silver badges31 bronze badges




                      5,4651 gold badge19 silver badges31 bronze badges












                      • sorry i tried it before it's not happening..!

                        – jay shah
                        Mar 26 at 5:41











                      • what error you are getting. please check the stackblitz

                        – TheParam
                        Mar 26 at 5:43











                      • i want to multiply each index and want to show it's data to the page

                        – jay shah
                        Mar 26 at 5:47











                      • Please share your product object

                        – TheParam
                        Mar 26 at 5:50











                      • i have shared all code to be perfromed above ..

                        – jay shah
                        Mar 26 at 5:52

















                      • sorry i tried it before it's not happening..!

                        – jay shah
                        Mar 26 at 5:41











                      • what error you are getting. please check the stackblitz

                        – TheParam
                        Mar 26 at 5:43











                      • i want to multiply each index and want to show it's data to the page

                        – jay shah
                        Mar 26 at 5:47











                      • Please share your product object

                        – TheParam
                        Mar 26 at 5:50











                      • i have shared all code to be perfromed above ..

                        – jay shah
                        Mar 26 at 5:52
















                      sorry i tried it before it's not happening..!

                      – jay shah
                      Mar 26 at 5:41





                      sorry i tried it before it's not happening..!

                      – jay shah
                      Mar 26 at 5:41













                      what error you are getting. please check the stackblitz

                      – TheParam
                      Mar 26 at 5:43





                      what error you are getting. please check the stackblitz

                      – TheParam
                      Mar 26 at 5:43













                      i want to multiply each index and want to show it's data to the page

                      – jay shah
                      Mar 26 at 5:47





                      i want to multiply each index and want to show it's data to the page

                      – jay shah
                      Mar 26 at 5:47













                      Please share your product object

                      – TheParam
                      Mar 26 at 5:50





                      Please share your product object

                      – TheParam
                      Mar 26 at 5:50













                      i have shared all code to be perfromed above ..

                      – jay shah
                      Mar 26 at 5:52





                      i have shared all code to be perfromed above ..

                      – jay shah
                      Mar 26 at 5:52

















                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55350480%2fhow-to-select-any-quantity-and-its-value-gets-changed%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                      SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                      은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현