Angularjs的响应没有打印在form中


Angularjs response not printing in form

我正试图从我的控制器打印响应到我的表单。但是它不打印从它传递过来的消息。

这是我的控制器。js文件

app.controller('regCtrl', function ($scope) {
});
$scope.doRegister = function ()
    {
        username = $scope.signup.registerUserName;
        email = $scope.signup.email;
        password = $scope.signup.registerPassword;
        $http({
            url: 'app/toolkit/calls/doRegister.php',
            method: "GET",
            params: {username: username, email: email, password: password}
        }).success(function (status, data, response, header) {
            $scope.data.msg = 'Account not Activated'
             });
    };

的形式是

<div ng-controller="regCtrl">
<div ng-if="data.show" ng-bind="data.msg"></div>

我在做什么错误,我怎么能使响应消息打印的形式。

我通过

将它变为$scope.data true来修复它
$scope.data = {show: true};

就行了。