rev087/ng-inspector

"Controller-As" syntax has different results from older syntax

Open

#130 创建于 2015年8月11日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)JavaScript (787 star) (100 fork)batch import
bughelp wanted

描述

Older Syntax:

angular.module('TestApp', [])
.controller('SampleCtrl', function($scope) {
    $scope.username = 'John Doe';
});

Result: Imgur


"Controller-As" syntax:

angular.module('TestApp', [])
.controller('SampleCtrl', function() {
    this.username = 'John Doe';
});

Result: Imgur

贡献者指南