A Pen by Justin Noel on CodePen.
Forked from aaccurso/Ionic-:-Simple-Navigation-Sample-with-Nav-Buttons.markdown
Created
July 20, 2016 01:50
-
-
Save CarlosOV/22bc3b56732c0756228c0489d9d54e01 to your computer and use it in GitHub Desktop.
A Pen by Justin Noel.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html ng-app="ionicApp"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> | |
<title>Ionic Template</title> | |
<link href="http://code.ionicframework.com/1.0.0-beta.1/css/ionic.css" rel="stylesheet"> | |
<script src="http://code.ionicframework.com/1.0.0-beta.1/js/ionic.bundle.js"></script> | |
</head> | |
<body> | |
<ion-nav-bar class="bar-positive nav-title-slide-ios7" align-title="center"> | |
<ion-nav-back-button class="button-icon ion-arrow-left-c"> | |
</ion-nav-back-button> | |
</ion-nav-bar> | |
<ion-nav-view class="slide-left-right"></ion-nav-view> | |
<script id="page1.html" type="text/ng-template"> | |
<!-- The title of the ion-view will be shown on the navbar --> | |
<ion-view title="Page 1" hide-back-button="true"> | |
<ion-content class="padding"> | |
<!-- The content of the page --> | |
<a class="button" ui-sref="page2">Go To Page 2</a> | |
</ion-content> | |
</ion-view> | |
</script> | |
<script id="page2.html" type="text/ng-template"> | |
<!-- The title of the ion-view will be shown on the navbar --> | |
<ion-view title="Page 2"> | |
<ion-nav-buttons side="left"> | |
<button class="button"> | |
LeftButton! | |
</button> | |
</ion-nav-buttons> | |
<ion-nav-buttons side="right"> | |
<button class="button"> | |
RightButton! | |
</button> | |
</ion-nav-buttons> | |
<ion-content class="padding"> | |
<!-- The content of the page --> | |
<a class="button" ui-sref="page1">Go To Page 1</a> | |
<a class="button" ui-sref="page3">Go To Page 3</a> | |
</ion-content> | |
</ion-view> | |
</script> | |
<script id="page3.html" type="text/ng-template"> | |
<!-- The title of the ion-view will be shown on the navbar --> | |
<ion-view title="Page 3"> | |
<ion-content class="padding"> | |
<!-- The content of the page --> | |
<a class="button" ui-sref="page1">Go To Page 1</a> | |
<a class="button" ui-sref="page2">Go To Page 2</a> | |
</ion-content> | |
</ion-view> | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('ionicApp', ['ionic']) | |
.config(function($stateProvider, $urlRouterProvider) { | |
$stateProvider | |
.state('page1', { | |
url: '/1', | |
templateUrl: 'page1.html' | |
}) | |
.state('page2', { | |
url: '/2', | |
templateUrl: 'page2.html' | |
}) | |
.state('page3', { | |
url: '/3', | |
templateUrl: 'page3.html', | |
controller : "Page3Ctrl" | |
}) | |
$urlRouterProvider.otherwise("/1"); | |
}) | |
.controller('Page3Ctrl', function($scope) { | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment