title: Replace text with selected item in AngularJS
body: <p>I've got dropdown in my HTML:</p>
  
  <pre><code>&lt;div class="dropdown"&gt;
          &lt;button class="dropdown-toggle" type="button" data-toggle="dropdown" ng-model="yearName"&gt;Sort by year
            &lt;span class="caret"&gt;&lt;/span&gt;&lt;/button&gt;
            &lt;ul class="dropdown-menu"&gt;
              &lt;li ng-repeat="year in ctrl.getYear() | orderBy: videoYear"&gt;
                &lt;input type="checkbox" ng-model="ctrl.filter[year]" id='year{{$index}}' class='chk-btn styled-checkbox' /&gt;
                &lt;label for='year{{$index}}'&gt;{{year}}&lt;/label&gt;
  
              &lt;/li&gt;
            &lt;/ul&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>The title is 'Sort by year', now but I wanna when changed an item, its getting by title. So, if I select 1984, title should be 1984. How can I do it?</p>
  
  <p>Thanks.</p>