Ons-tab and ons-navigator
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 - 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'; };
});
Developer | Keiji Odagawa |
Username | keiji |
Uploaded | December 19, 2022 |
Rating | 3 |
Size | 2,196 Kb |
Views | 26,312 |
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!
Name | Size |
Background-color of ons-page | 2,130 Kb |
Ng-show | 1,629 Kb |
Ons-lazy-repeat | 1,905 Kb |
Ons-toolbar | 1,774 Kb |
Ng-include Test | 1,744 Kb |
Ons-modal | 1,764 Kb |
Ons-tabbar with ons-sliding-menu | 1,850 Kb |
Ons-toolbar and ons-bottom-toolbar | 1,931 Kb |
Ons-carousel with ons-pull-hook | 2,072 Kb |
Ons-popover | 1,955 Kb |
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!
Name | Username | Size |
03 - CSS Variables | Run-time | 2,682 Kb |
Mondrian | Chrisarmstrong | 2,787 Kb |
Twitch Live Channels | Inkblotty | 4,956 Kb |
Another brick in the wall | Fivera | 1,955 Kb |
Nav Test -- cats 1 | Payls | 4,735 Kb |
Social buttons | Flacu | 2,022 Kb |
Gradient-ui-button-mark-fx | Tabspace | 1,881 Kb |
Scroll Arrow | Robooneus | 4,437 Kb |
SCSS Simple Animated Drop-In | Danwarfel | 2,175 Kb |
Hamburger Menu Animation | Salmanraza | 2,580 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!