angular在controller里面写数据的时候,如何在父数据里面写一个子数据

angular.module('commentContent')
    .controller('commentContentCtrl', [
        function () {
            var ctrl = this;
            ctrl.commentContents = [
                {
                    term: "1111" ,
                },
                {
                    term: "1111" ,
                },
                {
                    term: "1111" ,
                },
                {
                    term: "1111" ,
                },
                {
                    term: "1111" ,
                }
            ];
        }])
        
类似于这样,我写了一个数据,然后我想在每个数据里面再写一个子数据,类似于
angular.module('commentContent')
    .controller('commentContentCtrl', [
        function () {
            var ctrl = this;
            ctrl.commentContents = [
                {
                    term: "1111" ,
                    commentContentTexts = [
                    {
                    time:"1111",
                    }
                    {
                    time:"1111",
                    }
                    {
                    time:"1111",
                    }
                    {
                    time:"1111",
                    }
                    ];
                },
                {
                    term: "1111" ,
                },
                {
                    term: "1111" ,
                },
                {
                    term: "1111" ,
                },
                {
                    term: "1111" ,
                }
            ];
        }])
        这种样子的,请问该如何写,格式是什么呀?
阅读 1.5k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题