Move plugin to it's own directive
This commit is contained in:
parent
6605a49f7c
commit
6b12926887
3 changed files with 32 additions and 8 deletions
17
directives/plugin.html
Normal file
17
directives/plugin.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<div ng-show="data.visible">
|
||||
<button class="btn btn-primary btn-sm pull-right"
|
||||
ng-click="data.visible = false">
|
||||
Hide {{ data.name }}
|
||||
</button>
|
||||
<div ng-bind-html="data.content"></div>
|
||||
</div>
|
||||
|
||||
<div ng-hide="data.visible">
|
||||
<button class="btn btn-sm pull-right"
|
||||
bo-class="{
|
||||
'btn-warning': data.nsfw,
|
||||
'btn-primary': !data.nsfw}"
|
||||
ng-click="data.visible = true">
|
||||
Show {{ data.name }}
|
||||
</button>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue