Added further notes from Chapter 4 and my own research on directives, the linking function and $resource