<!DOCTYPE html>
<html ng-app="myApp">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width" />
<title>Ionic Framework Example</title>
<link href="//code.ionicframework.com/nightly/css/ionic.css" rel="stylesheet"/>
<link href="app.css" rel="stylesheet"/>
<script src="//code.ionicframework.com/nightly/js/ionic.bundle.js"></script>
<script src="app.js"></script>
</head>
<body ng-controller="MainCtrl">
<ion-pane>
<ion-header-bar class="bar-header">
<h1 class="title">Main Pageeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee</h1>
</ion-header-bar>
<ion-content has-header="true" padding="true">
<h2>Page width: {{dev_width}}px </h2>
<h2>Page height: {{dev_height}}px </h2>
</ion-content>
</ion-pane>
</body>
</html>
var app = angular.module('myApp', ['ionic']);
app.controller('MainCtrl', function($scope, $window) {
$scope.calculateDimensions = function(gesture) {
$scope.dev_width = $window.innerWidth;
$scope.dev_height = $window.innerHeight;
}
angular.element($window).bind('resize', function(){
$scope.$apply(function() {
$scope.calculateDimensions();
})
});
$scope.calculateDimensions();
});
.bar .title {
text-overflow: clip !important;
}