title: Creating wrapper DIV using loops and ng-class in AngularJS
body: <p>I'm currently working on creating a dynamic timeline using AngularJS. The data from my timeline is fetched from a JSON file, which I have already been successfully able at configuring. Here is what I currently have on PLNKR: <a href="http://plnkr.co/edit/avRkVJNJMs4Ig5mDrwJ8" rel="nofollow">http://plnkr.co/edit/avRkVJNJMs4Ig5mDrwJ8</a></p>
  
  <p>This is my current navigation: </p>
  
  <pre><code>   &lt;nav id="sticky-navigation"&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;a href="#decade-1960s"&gt;1960&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#decade-1970s"&gt;1970&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#decade-1980s"&gt;1980&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#decade-1990s"&gt;1990&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#decade-2000s"&gt;2000&lt;/a&gt;&lt;/li&gt;
            &lt;li class="active"&gt;&lt;a href="#decade-2010s"&gt;2010-Now&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/nav&gt;
  </code></pre>
  
  <p>I basically want to create wrapper divs for the unique ID's of "decade-1960s", "decade-1970s" etc so that the user can use the navigation to efficiently navigate to the decade they are most interested in looking at. The date is parsed from the JSON file, so I am wondering it there is another to fetch the year from the JSON, organize the events according to particular decades, and then add a wrapper for each decade.</p>
  
  <p>Thanks very much! I know it sounds very complicated! But I'm more of a front-end developer and designer, not so much a back-end programmer. </p>