I have a simple directive like that one :
Directive js :
.directive('pageHeader', function() {
return {
restrict: 'E',
scope: {
title: '=',
subtitle : '='
},
templateUrl: 'pages/templates/pageHeader.html'
};
})
Directive html :
<div class="page-header">
<span class="header-view-title" ng-bind="title"></span>
<span class="header-view-subtitle" ng-bind="subtitle"></span>
</div>
And i'm using that directive like this way :
<page-header title="'The blue elephant'" subtitle="'is walking to the street'"></page-header>
There's a way to passa a filter to the 'title' and 'subtitle', and use that filter. I tried like this, but failed :
<page-header title="The blue elephant | myfilter" subtitle="is walking to the street | myfilter"></page-header>
Did someone already need do something like that ?