window.alert("my device");
};
self.ctx.$scope.var = [
"id: 1, name: 'Batch A'",
"id: 2, name: 'Batch B'"
];
self.ctx.$scope.datasourceData = [];
self.ctx.detectChanges();
};
< /code>
html: < /p>
Hello World
Click me
{{ctx.$scope.var}}
- Wert: {{item}}
Erster Wert: {{ctx.$scope.var}}
< /code>
Что работает: < /p>
- Кнопка оповещения (ShowAlert) работает правильно. />
Accessing array items directly (e.g. {{ctx.$scope.var[1]}}) throws an error:
"Widget Error: can't access property 1, ctx.ctx.$scope.var is undefined"
-ng-repeat does not render any list items, although the array is initialized as expected in OnInit.
Подробнее здесь: https://stackoverflow.com/questions/796 ... table-data