javascript - AngularJS pass directive to direcive -


i have common pattern occurs, simplified along lines of (pretend caps things directives)

somestuff buttons header <div ng-repeat="blah in data">     content </div> footer 

this same , repeated throughout app, , repeated in subsequent apps. however, (particularly in future) have few pages buttons different else same. or maybe content different. obviously, make each of these sections directive , on each page put above, if decide there needs morestuff after footer on every page have go through every page , add this.

therefore, feel ideal setup 1 big directive, contains each of above smaller directives, , able plug in other directives, along lines of:

<bigdirective header="specialheader"> 

and generate big directive specialheader in place of header. equally

<bigdirective header="specialheader" footer="specialfooter"> 

is idea, or possible? exist or have generate , compile sub-directives on fly?


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -