Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript AngularJS An Introduction to Directives Directives: ng-click

Israel Bautista
Israel Bautista
2,391 Points

What does this has to do with the link function?

what is the purpose of this question that doesn't seem to have anything to do with the link function explained in the video? I expect that after watching a video the challanges would actually have something to do with what the video explained, otherwise what is the purpose? It makes it confusing and breaks the learning flow!

index.html
<!DOCTYPE html>
<html ng-app="myApp">
<head>
  <title>Angular.js</title>
  <script src="js/angular.js"></script>
  <script src="app.js"></script>
</head>
<body ng-controller="myController">

  <p>Hello {{name}}</p>
  <!-- YOUR CODE HERE -->

</body>
</html>

What is the specific instruction to this?

1 Answer

The first Code Challenge that you've linked to is in reference to the video Overview of Built-in Directives, in particular, the second directive Alex covers, ng-click.

The next Code Challenge, Directives: $attrs is about the link function.

I guess the teachers have to make the call of when to group videos together and when to break them up with Code Challenges.