html - Change a div position dynamically in angularjs -


i have (complex) toolbar panel can on top or bottom of page (it's configurable). there way avoid copy/paste toolbar in bottom of page?

here code in copy/paste way:

<div id="toptoolbar" data-ng-show="configs.toolbarposition=='top'">     <!-- toolbar --> </div>  <div>     <!-- inner page contents --> </div>  <div id="bottomtoolbar" data-ng-show="configs.toolbarposition=='bottom'">     <!-- copy/pasted toolbar --> </div> 

keep tool bar html in separate file, , include ever need.

<ng-include src="'views/toolbar.html'"></ng-include> 

also if needed add controller functionality. reuse code.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -