Read accelerometer data get using cordova watchAcceleration in a box of view

To get accelerometer data from a mobile application done with ionic, I used the code of the following page:

I would that the accelerometer data don’t show through an alert but in a box in a view. How can I do? How can I update view data every time that there are new accelerometer data?