rev087/ng-inspector

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

Open

#130 opened on Aug 11, 2015

View on GitHub
 (0 comments) (0 reactions) (0 assignees)JavaScript (787 stars) (100 forks)batch import
bughelp wanted

Description

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

Contributor guide