Hi,

To display your dropdown list you need to use ngOptions where you can do
some magic if you want. I would not do it, just display the policies. Once
the user selected a policy item then you can pass through the selected
object via ngSelected and you can call a method which populates another
dropdown. I would do this way. Here we have more experienced people who
might have better solution.

ngOptions:https://docs.angularjs.org/api/ng/directive/ngOptions
ngSelected: https://docs.angularjs.org/api/ng/directive/ngSelected

Thanks,

András

- -
--  Csanyi Andras (Sayusi Ando)  -- http://sayusi.hu --
http://facebook.com/andras.csanyi
--  ""Trust in God and keep your gunpowder dry!" - Cromwell

On 12 July 2016 at 10:12, 'Lars Goebels' via AngularJS <
[email protected]> wrote:

> I have an issue to build my code,
> i get this JSON for MasterPolicys and Plans and i have a separate call to
> get member data that contains the MasterPolicy as well but no Plan, because
> the user should select based on his MP.
> [
>    {
>       "policyNumber":"12356"
>       "plans":[
>          "C3_VIP",
>          "C2+Premium",
>          "C1-Basic"
>       ]
>    },
>    {
>       "policyNumber":"213456",
>       "plans":[
>          "C3_123",
>          "C2+556",
>          "C1-978"
>       ]
>    },
>    {
>       "policyNumber":"234671",
>       "plans":[
>          "PLAN 3",
>          "Plan 2",
>          "plan1"
>       ]
>    }
> ]
>
> I'm looking for a way to show a list of members that have a policyNumber,
> based on this number they should be able to select ONLY there corresponding
> plans.
> Whenever I change the policyNumber there should be also a change in my
> plans drop-down list.
> How can i make this happen?
> Thanks
> Lars
>
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to