Problem: $scope is undefined for Search Header in Tabs (codepen included)

So, I was searching for a Solution when I came to the following post.

Form ng-submit=“search()” inside ion-content doesn’t work

So I changed the ion-content from

<script id="templates/about.html" type="text/ng-template">
  <ion-view title="About">
    <ion-content class="padding">

Into

<script id="templates/about.html" type="text/ng-template">
  <ion-view title="About">
    <ion-content class="padding" ng-controller="AboutTabCtrl">

I tried to compare both in Batarang and turns out that if the Controller is injected (is this the right word?) then the search function and the query will be in the same scope. Not sure why, but at least it is working now.