AngularJs: how can I extract the variables/expressions that are defined in an template
<p>I'm trying to find a way to extract all the the variables/expressions that are defined within a template.</p>

<p>This is an example of the template:</p>

<pre><code>&lt;div&gt; 
    first name: {{firstname}} &lt;br/&gt;
    last name: {{lastname}}
&lt;/div&gt;
</code></pre>

<p>And I would like to get a list that contains:</p>

<pre><code>firstname
lastname
</code></pre>

<p>Is there a way to do this with angulars onboard functionality?</p>