Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Components in table are inserted outside the table #14466

@samueltardieu

Description

@samueltardieu

Do you want to request a feature or report a bug?

Bug report.

Steps to reproduce and a minimal demo of the problem

Live demo at: https://plnkr.co/edit/D1CYxP

<body ng-app="test">

  <!-- This should display 10, 20, and 30 on 3 different table rows -->
  <table>
    <tr><th>Column</th></tr>
    <row ng-repeat="i in [1, 2, 3]" idx="i"></row>
  </table>

  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js"></script>

  <script type="text/javascript">
    angular.module("test", []).component("row", {
      template: "<tr><td>{{$ctrl.idx * 10}}</td></tr>",
      bindings: { idx: "<" }
    });
  </script>
</body>

Current behavior

The component instances (row) are not inserted inside the table. It looks they attach somewhere outside the table and show:

10 20 30
Column

Expected/desired behavior

Column
10
20
30

Which versions of Angular, and which browser / OS are affected by this issue? Did this work in previous versions of Angular?

Not working on Angular 1.5.5 nor 1.5.4, tested on Chrome/Linux.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions