samedi 5 décembre 2015

How to make checkbox value based on select drodown using angular?

I have List Of Checkboxes with Samsung mobile models.I have Two Offers Also

$scope.offers = [
    {
        id: "as23456",
        Store: "samsung",
        Offer_message:"1500rs off",
        modalname: "Samsung Galaxy Young"       

    },{
        id: "de34575",
        Store: "samsung",
        Offer_message:"20% Flat on Samsung Galaxy S6",
        modalname: "Samsung Galaxy S6"       

    },
    ]

Here If user checked Samsung Galaxy S6.here we need to check with offers data whether we have offers or not for Samsung Galaxy S6. if we have offers select drop down should come with offer message

<select >
  <option value="0">Please Select Offer</option>
      <option value="Samsung Galaxy S6">20% Flat on Samsung Galaxy S6</option>
</select>

If user checked Samsung Galaxy Young.here we need to check with offers data whether we have offers or not for Samsung Galaxy Young. if we have offers select drop down should come with offer message

<select >
  <option value="0">Please Select Offer</option>
      <option value="Samsung Galaxy Young">1500rs off</option>
</select>

If user checked Samsung Galaxy Young, Samsung Galaxy S6 both.here we need to check with offers data whether we have offers or not for Samsung Galaxy Young,Samsung Galaxy S6. if we have offers select drop down should come with offer message

<select >
  <option value="0">Please Select Offer</option>
      <option value="Samsung Galaxy Young">1500rs off</option>
       <option value="Samsung Galaxy S6">20% Flat on Samsung Galaxy S6</option>
</select>

if user does not select these two (Samsung Galaxy Young,Samsung Galaxy S6) select drop down should not come.bcoz we dont have offers for other models. based on check and uncheck it should happen .pls some one help me out .i have added my demo




Aucun commentaire:

Enregistrer un commentaire