In Angular, the scope is the binding part between the HTML, i.e. the view and the Javascript, urf, controller. It acts like an object having various available properties and methods. The scope is available for both modes, view and controller. Here’s an example of how to use the scope in Angularjs properly:



<div ng-app="myApp" ng-controller="myCtrl">



var app = angular.module('myApp', []);

app.controller('myCtrl', function($scope) {
  $scope.carname = "Volvo";

Suggest An Answer