mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Fixed #465 - HTML in header titles
This commit is contained in:
6
dist/js/ionic-angular.js
vendored
6
dist/js/ionic-angular.js
vendored
@@ -2547,9 +2547,9 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu
|
||||
// Clone the old title and add a new one so we can show two animating in and out
|
||||
// add ng-leave and ng-enter during creation to prevent flickering when they are swapped during animation
|
||||
title = angular.element(titles[0]);
|
||||
oTitle = $compile('<h1 class="title" ng-bind="oldTitle"></h1>')($scope);
|
||||
oTitle = $compile('<h1 class="title" ng-bind-html="oldTitle"></h1>')($scope);
|
||||
title.replaceWith(oTitle);
|
||||
nTitle = $compile('<h1 class="title" ng-bind="currentTitle"></h1>')($scope);
|
||||
nTitle = $compile('<h1 class="title" ng-bind-html="currentTitle"></h1>')($scope);
|
||||
|
||||
var insert = $element[0].firstElementChild || null;
|
||||
|
||||
@@ -2578,7 +2578,7 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu
|
||||
'<button view-back class="button" ng-if="enableBackButton" ng-class="backButtonClass" ng-bind-html="backButtonLabel"></button>' +
|
||||
'<button ng-click="button.tap($event)" ng-repeat="button in leftButtons" class="button no-animation {{button.type}}" ng-bind-html="button.content"></button>' +
|
||||
'</div>' +
|
||||
'<h1 class="title" ng-bind="currentTitle"></h1>' +
|
||||
'<h1 class="title" ng-bind-html="currentTitle"></h1>' +
|
||||
'<div class="buttons" ng-if="rightButtons.length"> ' +
|
||||
'<button ng-click="button.tap($event)" ng-repeat="button in rightButtons" class="button no-animation {{button.type}}" ng-bind-html="button.content"></button>' +
|
||||
'</div>' +
|
||||
|
||||
2
dist/js/ionic-angular.min.js
vendored
2
dist/js/ionic-angular.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -41,9 +41,9 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu
|
||||
// Clone the old title and add a new one so we can show two animating in and out
|
||||
// add ng-leave and ng-enter during creation to prevent flickering when they are swapped during animation
|
||||
title = angular.element(titles[0]);
|
||||
oTitle = $compile('<h1 class="title" ng-bind="oldTitle"></h1>')($scope);
|
||||
oTitle = $compile('<h1 class="title" ng-bind-html="oldTitle"></h1>')($scope);
|
||||
title.replaceWith(oTitle);
|
||||
nTitle = $compile('<h1 class="title" ng-bind="currentTitle"></h1>')($scope);
|
||||
nTitle = $compile('<h1 class="title" ng-bind-html="currentTitle"></h1>')($scope);
|
||||
|
||||
var insert = $element[0].firstElementChild || null;
|
||||
|
||||
@@ -72,7 +72,7 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu
|
||||
'<button view-back class="button" ng-if="enableBackButton" ng-class="backButtonClass" ng-bind-html="backButtonLabel"></button>' +
|
||||
'<button ng-click="button.tap($event)" ng-repeat="button in leftButtons" class="button no-animation {{button.type}}" ng-bind-html="button.content"></button>' +
|
||||
'</div>' +
|
||||
'<h1 class="title" ng-bind="currentTitle"></h1>' +
|
||||
'<h1 class="title" ng-bind-html="currentTitle"></h1>' +
|
||||
'<div class="buttons" ng-if="rightButtons.length"> ' +
|
||||
'<button ng-click="button.tap($event)" ng-repeat="button in rightButtons" class="button no-animation {{button.type}}" ng-bind-html="button.content"></button>' +
|
||||
'</div>' +
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
left-buttons="leftButtons"
|
||||
right-buttons="rightButtons"
|
||||
type="bar-primary"></header-bar>
|
||||
<header-bar type="bar-positive" title="'Location'" left-buttons="leftButtons" right-buttons="rightButtons"></header-bar>
|
||||
<header-bar type="bar-positive" title="headerTitle" left-buttons="leftButtons" right-buttons="rightButtons"></header-bar>
|
||||
|
||||
<content>
|
||||
<input type="text" ng-model="headerTitle">
|
||||
@@ -30,10 +30,10 @@
|
||||
angular.module('headerTest', ['ionic'])
|
||||
|
||||
.controller('TestCtrl', function($scope) {
|
||||
$scope.headerTitle = 'A really really really really really long title here';
|
||||
$scope.headerTitle = 'A really really <u>really</u> really really long title here';
|
||||
$scope.leftButtons = [
|
||||
{
|
||||
content: 'Hello',
|
||||
content: 'Hello <b>Hello</b>',
|
||||
tap: function(e) {
|
||||
console.log('Click button');
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
|
||||
<script id="sign-in.html" type="text/ng-template">
|
||||
<view title="'Sign-In'" left-buttons="leftButtons" right-buttons="rightButtons">
|
||||
<view title="'<u>Sign-In</u>'" left-buttons="leftButtons" right-buttons="rightButtons">
|
||||
<content has-header="true">
|
||||
<div class="list">
|
||||
<label class="item item-input">
|
||||
|
||||
Reference in New Issue
Block a user