2
서버 목록에서 비동기 적으로 값 목록을 가져와야합니다. API의 메서드는 Future를 반환합니다.앵귤러 다트에서 컨트롤러의 속성에 미래를 지정할 수 있습니까?
물론 콜백을 생성하고 수동으로 결과를 할당 할 수 있습니다. AngularDart에 위임 할 수있는 방법이 있는지 궁금합니다.
class IndexPageController {
var apps;
EasyAPIClient api = new EasyAPIClient('/api/');
IndexPageController() {
_loadData();
}
_loadData() {
// this code executes successfully,
// however the template never receives the list.
apps = api.getAppNames();
}
}
지원 계획이 있습니까? –