Ons-tab and ons-navigator

Developer
Size
2,196 Kb
Views
26,312

How do I make an ons-tab and ons-navigator?

Multiple ons-show works when ons-navigator is set on ons-tab.. What is a ons-tab and ons-navigator? How do you make a ons-tab and ons-navigator? This script and codes were developed by Keiji Odagawa on 19 December 2022, Monday.

Ons-tab and ons-navigator Previews

Ons-tab and ons-navigator - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>ons-tab and ons-navigator</title> <link rel='stylesheet prefetch' href='https://unpkg.com/onsenui/css/onsenui.css'>
<link rel='stylesheet prefetch' href='https://unpkg.com/onsenui/css/onsen-css-components.css'>
</head>
<body> <header> <script src="https://production-assets.codepen.io/assets/common/everypage-01c45270878388899810ef244bb5267fa44f4c780718e35f2bb09a1761a4417c.js"></script> <script src="https://production-assets.codepen.io/assets/editor/global/commonLibs-a5100a910262f45ac88ceeb6af85b5aa5fe22535d3618909636ae0ec7cfce8ad.js"></script> <script src="https://production-assets.codepen.io/assets/editor/global/codemirror-f2d8ea173e36dcd8a6725faf78ec3aad078005cd1c43236dd69dcc1577cfe16d.js"></script> <script src="https://production-assets.codepen.io/assets/editor/pen/index-f9a871110f630c5d965738a6753c08b942c4845708f1b0a72687fd7dcc15ff1f.js"></script>
</header>
<ons-page ng-controller="AppController as app"> <ons-toolbar> <div class="center">My App - {{app.title}}</div> </ons-toolbar> <ons-tabbar position="auto"> <ons-tab page="nav1.html" label="Page 1" icon="square" active></ons-tab> <ons-tab page="nav2.html" label="Page 2" icon="square"></ons-tab> <ons-tab page="nav3.html" label="Page 3" icon="square"></ons-tab> </ons-tabbar>
</ons-page>
<ons-template id="nav1.html"> <ons-page> <ons-navigator var="nav1" page="page1.html"> </ons-navigator> </ons-page>
</ons-template>
<ons-template id="nav2.html"> <ons-page> <ons-navigator var="nav2" page="page2.html"> </ons-navigator> </ons-page>
</ons-template>
<ons-template id="nav3.html"> <ons-page> <ons-navigator var="nav3" page="page3.html"> </ons-navigator> </ons-page>
</ons-template>
<ons-template id="page1.html"> <ons-page ons-show="app.showPage1()"> <div class="content" style="text-align: center"> <p>Page 1 content</p> </div> </ons-page>
</ons-template>
<ons-template id="page2.html"> <ons-page ons-show="app.showPage2()"> <div class="content" style="text-align: center"> <p>Page 2 content</p> </div> </ons-page>
</ons-template>
<ons-template id="page3.html"> <ons-page ons-show="app.showPage3()"> <div class="content" style="text-align: center"> <p>Page 3 content</p> </div> </ons-page>
</ons-template> <script src='https://unpkg.com/onsenui/js/onsenui.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.5/angular.min.js'></script>
<script src='https://unpkg.com/onsenui/js/angular-onsenui.js'></script> <script src="js/index.js"></script>
</body>
</html>

Ons-tab and ons-navigator - Script Codes JS Codes

ons.bootstrap() .controller('AppController', function() { this.showPage1 = function() { alert("show page1"); this.title = 'Page 1'; }; this.showPage2 = function() { alert("show page2"); this.title = 'Page 2'; }; this.showPage3 = function() { alert("show page3"); this.title = 'Page 3'; };
});
Ons-tab and ons-navigator - Script Codes
Ons-tab and ons-navigator - Script Codes
Home Page Home
Developer Keiji Odagawa
Username keiji
Uploaded December 19, 2022
Rating 3
Size 2,196 Kb
Views 26,312
Do you need developer help for Ons-tab and ons-navigator?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Keiji Odagawa (keiji) Script Codes
Create amazing web content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!