Get your own website Result Size: 625 x 565
x
 
<!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">
<h1>{{carname}}</h1>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
    $scope.carname = "Volvo";
});
</script>
<p>The property "carname" was made in the controller, and can be referred to in the view by using the {{ }} brackets.</p>
</body>
<!-- Mirrored from www.w3schools.com/angular/tryit.asp?filename=try_ng_scope by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 05 Sep 2022 14:57:08 GMT -->
</html>