BackboneJS Adding current page(View) refresh

Add icon in template:-

1
2
3
4
5
6
<li>
               <a id="refreshPage">
               //Adding refresh icon
               <i class="fa fa-refresh"></i>
               </a>
            </li>

Add functionality in model:-

1
2
3
4
5
//Adding refresh functionality
                $('#refreshPage').click(function(e){
                    e.preventDefault();
                    Backbone.history.loadUrl(Backbone.history.fragment);
                });