Click here to navigate the course.

Drag the edges to resize the window.

In Projects, you can keep track of your progress as you go throught the tasks. Check each item as you complete it!

Code Editor
Web Browser
Learn

We used app.directive to create a new directive named 'installApp'.

  • The directive contains the three options restrict, scope, and templateUrl that we saw before in the 'appInfo' directive.
  • It also contains a fourth option link. The link is used to create interactive directives that respond to user actions.

The link function takes three inputs:

  1. scope refers to the directive's scope. Any new properties attached to $scope will become available to use in the directive's template.
  2. element refers to the directive's HTML element.
  3. attrs contains the element's attributes.

Inside the link function, there are two properties buttonText and installed, and the function download(). We'll use these in the directive's template next.

Report a Bug
If you see a bug or any other issue with this page, please report it here.