Create Table from JSON Data with angularjs and ng-repeat

后端 未结 6 1393
-上瘾入骨i
-上瘾入骨i 2020-12-09 05:32

I have the following data as JSON:

{
  \"Workout1\": {
    \"Name\": \"First\",
    \"Rounds\": [
      {
        \"Exercises\": [
          {
            \"         


        
6条回答
  •  无人及你
    2020-12-09 05:34

    Angular 2 or 4:

    There's no more ng-repeat, it's *ngFor now in recent Angular versions!

    id status name
    {{item.id}} {{item.status}} {{item.name}}

    Used this simple JSON:

    [{"id":1,"status":"active","name":"A"},
    {"id":2,"status":"live","name":"B"},
    {"id":3,"status":"active","name":"C"},
    {"id":6,"status":"deleted","name":"D"},
    {"id":4,"status":"live","name":"E"},
    {"id":5,"status":"active","name":"F"}]
    

提交回复
热议问题