OpenUI5 / SAPUI5: Get Data from REST and display it in List
<p>I want to get data from a REST API. This worked so far but I can't display the list with my XML view...</p>

<p><strong>controller.js</strong></p>

<pre><code>onInit: function () {
    var oContactModel = new sap.ui.model.json.JSONModel();

    oContactModel.loadData(
        "http://localhost:8080/api/v1/contacts", null, true, 'GET'
    );

    sap.ui.getCore().setModel(oContactModel, "restContacts");
};
</code></pre>

<p><strong>view.xml</strong></p>

<pre><code>&lt;List id="contactList" width="auto" items="{restContacts&gt;/}"&gt;
    &lt;items&gt;
        &lt;ObjectListItem
            title="{restContacts&gt;/name}"
            type="Navigation"
            press="onPressContact"
        /&gt;
    &lt;/items&gt;
&lt;/List&gt;
</code></pre>

<p>When I print the model from controller to console it shows me the data. But when I want to access the data in my XML view nothing happens...
The data from REST looks like this:</p>

<pre><code>[
    {
        "id": 1,
        "name": "Thomas123",
        "registrationToken": "laksjdhoi",
        "available": true
    }, {
        "id": 2,
        "name": "Thomas123",
        "registrationToken": "laksjdhoi",
        "available": true
    }
]
</code></pre>