diff --git a/gulpfile.js b/gulpfile.js index 7a3984632e..d58b25b84b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -6,6 +6,7 @@ var dgeni = require('dgeni'); var es = require('event-stream'); var htmlparser = require('htmlparser2'); var lunr = require('lunr'); +var mkdirp = require('mkdirp'); var yaml = require('js-yaml'); var http = require('http'); @@ -71,7 +72,7 @@ gulp.task('docs-index', function() { var yamlRaw = contents.substring(yamlStartIndex+3, yamlEndIndex); var properties = yaml.safeLoad(yamlRaw); - contents = contents.slice(yamlEndIndex+3); + contents = contents.substring(yamlEndIndex+3); if(properties.title && properties.layout) { title = properties.title; @@ -98,6 +99,7 @@ gulp.task('docs-index', function() { callback(); })).on('end', function() { // Write out as one json file + mkdirp.sync('tmp/ionic-site/data'); fs.writeFileSync('tmp/ionic-site/data/index.json', JSON.stringify({'ref': ref, 'index': idx.toJSON()})); }); }); diff --git a/js/ext/angular/src/directive/ionicTabBar.js b/js/ext/angular/src/directive/ionicTabBar.js index e2d90f0cd3..275653e5ee 100644 --- a/js/ext/angular/src/directive/ionicTabBar.js +++ b/js/ext/angular/src/directive/ionicTabBar.js @@ -257,6 +257,11 @@ function($rootScope, $animate, $ionicBind, $compile, $ionicViewService) { element[0].querySelector('data-ion-nav-view'); var navViewName = navView && navView.getAttribute('name'); + var tabNavItem = angular.element( + element[0].querySelector('ion-tab-nav') || + element[0].querySelector('data-ion-tab-nav') + ).remove(); + //Remove the contents of the element so we can compile them later, if tab is selected var tabContent = angular.element('