How to assign a value in $scope in a promise response? [duplicate]

I have the following code, where I am trying to show the value of Bitcoin in a text box after getting it from the coinmarketcap REST API, using the axios library. Although the value is written fine in console, the text box remains empty. What mistake am I doing here?

<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"</script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<body>

<div ng-app="myApp" ng-controller="myCtrl">

<input ng-value="myVar">

</div>

<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
    function get_btc_value(){
        // return this promise
        return axios.get('https://api.coinmarketcap.com/v1/ticker/bitcoin/')
.then((data)=>{
            console.log(data.data[0].price_usd)
            return data.data[0].price_usd
    })
    }

    get_btc_value().then(data => $scope.myVar = data)
});
</script>

</body>
</html>

Source: AngularJS