Added title parameter to ionView

This commit is contained in:
Rijk van Wel 2015-04-15 14:41:27 +02:00
parent af62af5533
commit bbc03d6056
2 changed files with 11 additions and 0 deletions

View file

@ -1,4 +1,10 @@
<template name="ionView">
{{#if title}}
{{#contentFor "headerTitle"}}
<h1 class="title">{{title}}</h1>
{{/contentFor}}
{{/if}}
<div class="{{classes}}">
{{> UI.contentBlock}}
</div>

View file

@ -19,5 +19,10 @@ Template.ionView.helpers({
}
return classes.join(' ');
},
title: function () {
if ( Template.instance().data && Template.instance().data.title ) {
return this.title;
}
}
});