March 2018
Beginner to intermediate
514 pages
13h 11m
English
Scope, or $scope, is the glue between the application controller (JavaScript) and the view (HTML). It allows for a two-way data binding and, using $watch expressions, constantly monitors for changes of the data either on the view or on the controller. It's a JavaScript object which can hold properties and methods. The scope is unique to a specific controller, so if you have multiple controllers on an app, such as in the case of different Qlik Sense extensions, the scope will only be local to that particular extension.
To add properties or update values to a $scope, simply update it in the controller code as you would with any other JavaScript variable:
$scope.name = "Martin Mahler";
To retrieve the scope in the view, simply reference ...
Read now
Unlock full access