fix(generators): replace tabs code lost by atom crashing

This commit is contained in:
Tim Lancina
2016-01-07 19:26:14 -06:00
parent d7b639e13b
commit f7af052330
2 changed files with 13 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<ion-tabs>
<% _.forEach(tabs, function(tab, i) { %>
<ion-tab [root]="tab<%= ++i %>Root" tab-title="<%= tab.name %>" tab-icon="star"></ion-tab>
<ion-tab [root]="tab<%= ++i %>Root" tabTitle="<%= tab.name %>" tabIcon="star"></ion-tab>
<% }); %>
</ion-tabs>

View File

@ -1,3 +1,14 @@
import {NavController, Page} from 'ionic/ionic';
<% _.forEach(tabs, function(tab) { %>import {<%= tab.jsClassName %>} from '../<%= tab.fileName %>/<%= tab.fileName %>';
<% }); %>
@Page({
templateUrl: 'build/<%= directory %>/<%= fileName %>/<%= fileName %>.html'
})
export class <%= jsClassName %> {
constructor(nav: NavController) {
// set the root pages for each tab
<% _.forEach(tabs, function(tab, i) { %>this.tab<%= ++i %>Root = <%= tab.jsClassName %>;
<% }); %>
}
}