Skip to content

Commit

Permalink
fixes #10021 adds ng-form and val-form-manager to the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
madsrasmussen committed Mar 30, 2021
1 parent 499e4f0 commit 50e7d47
Showing 1 changed file with 23 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,27 @@ Use this directive to render a tabs navigation.
<pre>
<div ng-controller="My.Controller as vm">
<umb-tabs-nav
tabs="vm.tabs"
on-tab-change="vm.changeTab(tab)">
</umb-tabs-nav>
<umb-tab-content
ng-repeat="tab in vm.tabs"
ng-show="tab.active"
tab="tab">
<div ng-if="tab.alias === 'tabOne'">
<div>Content of tab 1</div>
</div>
<div ng-if="tab.alias === 'tabTwo'">
<div>Content of tab 2</div>
</div>
</umb-tab-content>
<!-- The tabs navigation depends on a form and the validation manager. If the tabs are used inside a property editor or dashboard this is already added -->
<ng-form name="tabsForm" val-form-manager>
<umb-tabs-nav
tabs="vm.tabs"
on-tab-change="vm.changeTab(tab)">
</umb-tabs-nav>
<umb-tab-content
ng-repeat="tab in vm.tabs"
ng-show="tab.active"
tab="tab">
<div ng-if="tab.alias === 'tabOne'">
<div>Content of tab 1</div>
</div>
<div ng-if="tab.alias === 'tabTwo'">
<div>Content of tab 2</div>
</div>
</umb-tab-content>
</ng-form>
</div>
</pre>
Expand All @@ -37,7 +40,7 @@ Use this directive to render a tabs navigation.
(function () {
"use strict";
function Controller() {
function Controller(eventsService) {
var vm = this;
Expand All @@ -62,7 +65,7 @@ Use this directive to render a tabs navigation.
selectedTab.active = true;
};
eventsService.on("tab.tabChange", function(name, args){
eventsService.on("app.tabChange", function(name, args){
console.log("args", args);
});
Expand Down

0 comments on commit 50e7d47

Please sign in to comment.