Skip to content

ListView can't hold directives alone in template #93

@diestrin

Description

@diestrin

I have the following code

@Component({
  selector: 'TodoList',
  directives: [Todo],
  template: `
<ListView [items]="todos">
  <item-template>
    <template #item="item">
      <Todo [item]="item"></Todo>
    </template>
  </item-template>
</ListView>
`
})

But when it tries to render the todos, I got the following error file:///app/tns_modules/ui/core/view.js:107:116: JS ERROR Error: onMeasure() did not set the measured dimension by calling setMeasuredDimension()

However, if I wrap the <Todo> in a <StackLayout>, it works.

Not sure what's exactly going on, but what I asume, is that <Todo> (or any other custom directive) doesn't have a default height/width, so that's why it fails to render.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions