Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. <div class="form-group">
  2. <div>
  3. <yesno-button class="radioField" show-hide ng-click="showChildFields(ev)"></yesno-button>
  4. <label class="radio-inline control-label">1st Container</label>
  5. </div>
  6. </div>
  7. <div class="form-group" style="display:none;">
  8. <div>
  9. <yesno-button class="radioField"></yesno-button>
  10. <label class="radio-inline control-label">2nd Container</label>
  11. </div>
  12. </div>
  13.  
  14. module.directive("showHide", function () {
  15.  
  16. return {
  17.  
  18.  
  19. link: function (scope, element, attrs, controller) {
  20.  
  21. scope.showChildFields = function (ev) {
  22. //need to enable and disbale 2nd container with ng-animation
  23. };
  24. }
  25. };
  26. });
  27.  
  28. <div class="form-group">
  29. <div>
  30. <input type="button" ng-click="container.showChildren = !container.showChildren" value="Yes/No"/>
  31. <label class="radio-inline control-label">
  32. 1st Container
  33. </label>
  34. </div>
  35. </div>
  36. <div class="form-group animate-show" ng-show="container.showChildren">
  37. <div>
  38. <input type="button" value="Yes/No"/>
  39. <label class="radio-inline control-label">
  40. 2nd Container
  41. </label>
  42. </div>
  43. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement