Files
ionic-framework/js/ext/angular/test/header.html
Andy Joslin 2c39a21498 feat(ionic): prefix all directives with ion-
BREAKING CHANGE: All directives are now prefixed with `ion-`.

For any directive you use, add the ionic prefix.

For example, change this HTML:

```html
<tabs>
  <tab title="home" href="/tab/home">
    <content>Hello!</content>
  </tab>
</tabs>
```

To this HTML:

```
<ion-tabs>
  <ion-tab title="home" href="/tab/home">
    <ion-content>Hello!</ion-content>
  </ion-tab>
</ion-tabs>
```
2014-02-18 16:13:00 -05:00

63 lines
2.0 KiB
HTML

<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
title="headerTitle"
left-buttons="leftButtons"
right-buttons="rightButtons"
type="bar-primary"></ion-header-bar>
<ion-header-bar type="bar-positive" title="headerTitle" left-buttons="leftButtons" right-buttons="rightButtons"></ion-header-bar>
<ion-content>
<input type="text" ng-model="headerTitle">
</ion-content>
<script>
angular.module('headerTest', ['ionic'])
.controller('TestCtrl', function($scope) {
$scope.headerTitle = 'A really really <u>really</u> really really long title here';
$scope.leftButtons = [
{
content: 'Hello <b>Hello</b>',
tap: function(e) {
console.log('Click button');
}
}
]
$scope.rightButtons = [
{
content: 'Hello',
tap: function(e) {
console.log('Click button');
}
}
]
});
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]).isolateScope();
s.headerBarView.align();
};
</script>
</body>
</html>