我可以在元素中添加多少个ng-model?

时间:2016-11-10 10:12:11

标签: javascript angularjs model

public static Company RetrieveCompany(int id)
{
    var cmp = new Company();
    try
    {
        using (var con = new SqlConnection(ConfigurationManager.ConnectionStrings["MyDB"].ConnectionString))
        {
            con.Open();
            using (var cmd = new SqlCommand("RetreiveEmailProc", con))
            {
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@companyId", id);

                SqlDataReader sdr = cmd.ExecuteReader();
                while (sdr.Read())
                { // code omitted }
            }           

        }
    }
    catch(Exception ex)
    {

    }

    return cmp;
}

我可以添加多个" ng-model"元素?像那样:

 <td style="width:5%" class="active"><input type="checkbox" ng-model="rep.Selected"/></td>

它会起作用吗?

0 个答案:

没有答案