I am trying to replicate the following jsfiddle using only angular (no jquery).

<http://jsfiddle.net/E7xER/381/>

Essentially I would like to set up event listeners to bind to elements which don't yet exist. With jquery this can be accomplished with:

```
$('#container').on('click', '.class', myFunction);

```

**What is the "angular way" to bind to elements that do not yet exist?** I suspect I will need to create a new directive to do this, and I believe I may need to inject $compile to compile the newly added DOM elements. I am new to AngularJS though and I am unsure how to implement this.