Waiting for response from firebase in angularJS

I am new to firebase and I am using new console to simply demonstrate saving, retrieving data from firebase real time database. On retrieving the data, I am connecting it to a model to show it on the screen in list format. But the screen doesn't show anything. I want to use promise to wait until I get the data from the firebase database.