AngularJS: Where to put which logic when building an HTML widget

I'm very(!) new to Angular.js and am trying to understand where to put the various parts of my logic in order to follow best practices and separate business and presentation logic.

My specific use case is that I have a list of courses with a number of signups and a number of available seats. Based on these values I want to present a progress bar (or, if the available seats is not set, just a text).

My question is where to put the various parts of the logic, and how to pass the values along properly. So far I've created the HTML-part of a directive, like so:

<signupprogress available="{{course.available_seats}}" filled="{{course.filled_seats}}"></signupprogress>

My question is then (first and foremost) if a directive is the proper way to do this and, of so, if the logic for constructing the progress bar should go in the compile function, link function, in a template, or some other place. To me the compile of link function seems to be most correct, but I don't want to fill them with HTML, nor am I able to properly get the attribute values from the HTML (the attrs.$observe examples I've seen only implement the getting of one attribute).

The directive is the way to go in my opinion. I would have my HTML content inside of a template, the logic inside of the link function (the compile function is usually more for repeaters etc). And use the "scope" property in the directive definition, set to "=", that way changes are reflected automatically.

Yes, use a directive since you need to modify the DOM.

If all of the HTML for the progress bar and the alternative text can be placed in the directive's template, then do that. And, if that is possible, use '@' for one-way binding, which makes it clear that the directive does not need to modify the "available" and "filled" values. If you find you need a linking function, then as @ShaiRez mentioned, '=' is probably easier. (BTW, here is a way to $watch multiple attributes, instead of using $observe. Maybe the same technique can be used for $observe.)

To display either a progress bar or the alternative text in the template, use ng-hide or ng-show in the template. Here's a simple example of that (which also uses '@').