set $scope on timeout callback doesn't work

HTML

<div ng-controller="MyCtrl">{{greeting}} {{data}}</div>

JavaScript

var myApp = angular.module('myApp', []);

myApp.controller('MyCtrl', function ($scope,$timeout) {
 
    $timeout(function () {
        console.log('update greeting');
        $scope.greeting = 'init';
        $scope.greeting = 1; // doesn't work here.
    }, 3000);
})