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

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -