ng-repeat from within innerHTML function?

前端 未结 2 1125
一整个雨季
一整个雨季 2021-01-23 12:17

I have 3 columns. The first lists a list of subjects from an array. Within that array, each subject has it\'s particular courses listed within, and within that, the rest of the

2条回答
  •  无人及你
    2021-01-23 12:29

    No, it won't work.

    You need to use template or directive.

    http://docs.angularjs.org/guide/directive

    You simple move innerHTML string to directive template

    .directive('myCustomer', function() {
      return {
        scope: {
              subject: '='
        },
        template: ''
      };
    });
    

    And use it like

    
    

提交回复
热议问题