← BYTES
AngularJS·Starter·Ref: 5.1.2

What is the purpose of the ng-controller directive?

Have a question about this video? Mention reference 5.1.2 when you contact us.

a.It loads an external JavaScript file
b.It defines a CSS class
c.It attaches a controller's behavior (and its $scope) to the DOM element it's declared on
d.It creates a new AngularJS module
ng-controller instantiates the named controller and attaches its $scope to that element and its children, making the controller's data and functions available to bindings and directives nested inside it.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES512#AngularJS