vendredi 4 septembre 2015

MVCRazor checkbox for adding modellist angularjs

I have a scenerio like this:

public class Project
{
    [Key]
    public int ID { get; set; }
    public string Name { get; set; }
    public List<Version> Versions { get; set; }
}
public class Version
{
    [Key]
    public int ID { get; set; }
    public string Name { get; set; }
    public TypePlatform Platform { get; set; }
}

In my project create view i have loaded all the TypePlatform to

<label ng-repeat="p in TypePlatforms">
    <input type="checkbox"  />{{p.Name}}
</label>

I need to add Version in Project.Versions list according to the check state of checkbox and also assign respective TypePlatform to Project.Version[?].Platform

How can i achieve this in angularjs




Aucun commentaire:

Enregistrer un commentaire