我有一个来自API的Methode.它返回一个解析为$ ctrl(?)对象的promise.此对象应包含度量,并在收到新数据时进行更新.
getMeasurements.latest(filter) //only a object to filter through all measurements
.then(function (latestMeasurement) {
$ctrl.latestMeasurement = latestMeasurement;
});
Run Code Online (Sandbox Code Playgroud)
我的问题是我不知道如何处理这些数据或在我的html文件中显示它.$ ctrl如何工作?
这里是API 的文档
html angularjs angularjs-scope cumulocity angularjs-components