Labels

Learn the powerful enterprise adaptable database:

Getting Started With ADABAS & Natural

Saturday, January 7, 2017

100 Ionic Blank Template


.
100 Ionic Blank Template
HTML
<html>
 <head>
   <meta charset="utf-8">
   <title>Diary</title>
   <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
   <!-- Internal Library
   <link href="lib/ionic/css/ionic.css" rel="stylesheet">
   <script src="lib/ionic/js/ionic.bundle.js"></script>
   -->
   <!-- Cloud Library -->
   <link href="//code.ionicframework.com/nightly/css/ionic.css" rel="stylesheet">
   <script src="//code.ionicframework.com/nightly/js/ionic.bundle.js"></script>
   <!-- Needed for Cordova/PhoneGap (will be a 404 during development) -->
   <script src="cordova.js"></script>
 </head>
   <body ng-app="app">
 <div>
 <div>
   <ion-nav-bar class="bar-stable">
     <ion-nav-back-button></ion-nav-back-button>
   </ion-nav-bar>
   <ion-nav-view></ion-nav-view>
 </div>
</div>
 
    <script id="home.html" type="text/ng-template">
<ion-view title="Home" id="page1">

 <ion-content padding="true" class="has-header">

      </ion-content>
</ion-view>
   </script>  
     
 </body>
</html>
JS
angular.module('app', ['ionic'])
.controller('homeCtrl', ['$scope',
function ($scope) {
}])
   
.config(function($stateProvider, $urlRouterProvider) {
  $stateProvider
      .state('home', {
    url: '/page1',
    templateUrl: 'home.html',
    controller: 'homeCtrl'
  })
$urlRouterProvider.otherwise('/page1')
});
CODEPEN:

.
See the Pen 100 Ionic Blank Template by notarazi (@notarazi) on CodePen.

No comments:

Post a Comment