forked from ionic-team/ionic-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.html
53 lines (51 loc) · 1.69 KB
/
header.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<html ng-app="headerTest">
<head>
<meta charset="utf-8">
<title>Header</title>
<!-- Sets initial viewport load and disables zooming -->
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="../../../../dist/css/ionic.css">
<script src="../../../../dist/js/ionic.bundle.js"></script>
</head>
<body ng-controller="TestCtrl">
<ion-header-bar class="bar-positive">
<div class="buttons">
<button class="button">
Hello <b>Hello</b>
</button>
</div>
<h1 class="title">{{headerTitle}}</h1>
<div class="buttons">
<button class="button">
Farewell!
</button>
</div>
</ion-header-bar>
<ion-content class="has-header">
<input type="text" ng-model="$parent.headerTitle">
<br/>
<input type="text" ng-model="$parent.align">
</ion-content>
<script>
angular.module('headerTest', ['ionic'])
.controller('TestCtrl', function($scope) {
$scope.headerTitle = 'A really really <u>really</u> really really long title here';
});
var midPoint = window.clientWidth / 2;
var box = document.createElement('div');
box.style.backgroundColor = 'red';
box.style.opacity = '0.6';
box.style.width = '2px';
box.style.height = '44px';
box.style.left = '50%';
box.style.position = 'fixed';
box.style.zIndex = 100;
box.style.top = '0px';
box.style.marginLeft = '-1px';
document.body.appendChild(box);
window.onresize = function() {
var s = angular.element(document.getElementsByTagName('header')[0]).scope();
};
</script>
</body>
</html>