var Tabs = require('nsx/injectors/tabs');

// Once 'nsx/injectors/tabs' has been loaded, tabs can be defined with
// 'defineTabs' relative to the page
var tabs = page.defineTabs({
  selector: "#details"

// 'defineTab' returns a new injector, which can used, like page, to define
// page-segments etc. relative to the newly created tab
var tab1 = tabs.defineTab({
  name: "...", // name of the tab
  view: "...", // reference to the html for the page under the tab
  viewModel: {/*...*/} // viewModel for the page under the tab

// tab1 behaves the same way as a page-segment
tab1.definePageSegment(/*... */)