修改typeTemplateController.js的findOne方法
//查询实体
$scope.findOne=function(id){
typeTemplateService.findOne(id).success(
function(response){
scope.entity.brandIds=JSON.parse($scope.entity.brandIds);//转换品牌列表
scope.entity.specIds);//转换规格列表
scope.entity.customAttributeItems);//转换扩展属性**
}
);
}
从数据库中查询出来的是字符串,我们必须将其转换为json对象才能实现信息的回显。
数据库中字符串转换为json对象实现信息回显。
猜你喜欢
转载自blog.csdn.net/Bird_King/article/details/93017177
今日推荐
周排行