As I delve into learning AngularJS, I am attempting to utilize a variable from the controller in an ng-repeat without using scope. However, my code is not functioning as expected. Can someone help me identify and correct my mistake? Below is the snippet of my code:
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
<select>
<option ng-repeat="x in myCtrl.names">{{x}}</option>
</select>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
var that = this;
that.names = ["Emil", "Tobias", "Linus"];
});
</script>
</body>
</html>