Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49186

Ion-header-bar Partial with seperate controller?

$
0
0

@romin wrote:

Hello everyone,

I want to have ion-header-bar and footer-bar in seperate partials so i can include them in all pages and i don't repeat myself, my header and footer partial have their own controllers!

Can somebody show me how to include these partials? Thanks!

header.js partial

(function () {
  'use strict';

  function headerCtrl($scope) {
      alert('i am header');
  }

   angular.module('starter.header', [])
   .controller('HeaderCtrl', headerCtrl);
})();

footer.html partial
<ion-header-bar align-title="left" class="bar-positive">
<div class="buttons">
<button class="button" ng-click="doSomething()">Left Button</button>
</div>
<h1 class="title">Title!</h1>
<div class="buttons">
<button class="button">Right Button</button>
</div>
</ion-header-bar>

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49186

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>