Add tab to 'Tabs' template


Just starting out with this. I just wanted to add a new tab to the base template of tabs.

Ever thing else in the template can assumed to be the same apart from the changes below…


.controller('SearchChains', function($scope) {


.state('', {
  url: '/search',
  views: {
    'tab-search': {
      templateUrl: 'templates/tab-search.html',
      controller: 'SearchChains'

 <!-- Search Tab -->
 <ion-tab title="Search" icon="icon ion-search href="#/tab/search">
 <ion-nav-view name="tab-search"></ion-nav-view>

I have created tab-search.html which is just a copy of one of the other templates. When I try and run this I get the following error in chrome

Uncaught SyntaxError: Unexpected token . in controllers.js

Why is this?


Check the syntax in your Controllers.js. When you created your SearchChains controller, you likely forgot to remove the trailing semi-colon (:wink: from the controller listed above.

Only the last controller in your controller.js file should end with a semi-colon.