1

I would like to build an html table based on a model.

I want to do something like that:

Student         | competence 1                        |
                | subject 1                | subject 2|
                | exam 1 | exam2 | average |          |
xxxxx yyyyyyyyy |   10   | 20    |   15    | 45       |

And here is how I'm trying to do this:

table(ng-controller="ExaminationListCtrl")
  tr
    th(ng-repeat="(competence, s) in competenceToSubjectSize", colspan="{{s.length}}")
      {{competence}}
  tr
    th(ng-repeat="subject in subjects")
      {{subject.subject}}

My issue is that I can't use colspan="{{s.length}}", it seems to me that "competence" and s are only bound to the child of th elements How could I achieve this?

1 Answer 1

1

I was wrong since the top tag we could access to the scope marked with the ng-repeat

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.