码迷,mamicode.com
首页 > 其他好文 > 详细

Angular4.0 实现数据绑定举例

时间:2017-08-03 15:03:01      阅读:205      评论:0      收藏:0      [点我收藏+]

标签:绑定   typelist   数据   innerhtml   cti   business   etc   ima   result   

技术分享技术分享技术分享

function Load() {
            $.ajax({
                type: "get",
                url: "/BizAccount/BizAccountHandle.ashx?Action=GetAccountInfo&Id=" + $("#hdAccountId").val(),
                success: function (result) {
                    if (result.State == "100000") {
                        //绑定用户信息
                        //var userTemplate = document.getElementById(‘js-template-accountInfo‘).innerHTML;
                        //var userTempFn = doT.template(userTemplate);
                        //var userHtml = userTempFn(result.Data);
                        //$(".Header").html(userHtml);
                        $("#UserName").text(result.Data.FBelongName);
                        if (result.Data.BusinessTypeList && result.Data.BusinessTypeList.length > 0) {
                            var businessTemplate = document.getElementById(‘js-template-businesstypeinfo‘).innerHTML;
                            var businessTempFn = doT.template(businessTemplate);
                            var businessHtml = businessTempFn(result.Data.BusinessTypeList);
                            console.log(result.Data.BankSupportEntryList);
                            $(".MainContain .navigation .nav").html(businessHtml);
                            $(".MainContain .navigation .nav .BusinessType:first").addClass("cuur");
                            var currentTypeId = GetCurrentTypeId();
                            LoadChannelFeeList(currentTypeId);//手续费注释
                        }
                        $("#BelongBusinessName").text(result.Data.FBelongBusinessName);
                        // console.log("ccm:" + result.Data.FBelongBusinessName + "===" + $("#BelongBusinessName").text());
                    } else {
                        alert(result.Message);
                    }
                }
            })
        }

Angular4.0 实现数据绑定举例

标签:绑定   typelist   数据   innerhtml   cti   business   etc   ima   result   

原文地址:http://www.cnblogs.com/ccmsalome/p/7279376.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!