在Ionic2应用程序中打开新选项卡

时间:2017-04-28 08:13:44

标签: ionic2

我正在尝试向应用添加新标签,就像信息页一样。添加了额外的页面,我创建了一个新选项卡,但它根本不起作用。甚至没有显示基本的离子细节。我在app.module.ts和tabs文件夹中添加了新页面。

tabs.ts

Sub MM1()
    ' Speed improvements
    Application.ScreenUpdating = False
    Application.Calculation = xlCalculationManual
    ' Use last cell in UsedRange for its row number,
    ' if row 1,2,... aren't used, then UsedRange will be shorter than you expect!
    Dim lastrowsheet2 As Long
    With ThisWorkbook.Sheets("Sheet2").UsedRange
        lastrowsheet2 = .Cells(.Cells.Count).Row
        ' If sheet is completely empty, make sure data will be inserted on row 1 not 2
        If lastrowsheet2 = 1 And .Cells(1).Value = "" Then lastrowsheet2 = 0
    End With
    ' Get user input for a search term
    Dim userinput As String
    userinput = InputBox("Enter a value to search for.", "Column A Search")
    ' Search for value
    Dim findrange As Range
    Dim firstaddress As String
    Set findrange = ThisWorkbook.Sheets("Sheet1").Columns("A").Find(what:=userinput, lookat:=xlWhole, LookIn:=xlValues)
    If findrange Is Nothing Then
        MsgBox "No matching search results"
    Else
        firstaddress = findrange.Address
        Do
            lastrowsheet2 = lastrowsheet2 + 1
            ' Copy values in found row to sheet 2, in new last row
            ThisWorkbook.Sheets("Sheet2").Range("A" & lastrowsheet2, "AL" & lastrowsheet2).Value _
                = ThisWorkbook.Sheets("Sheet1").Range("A" & findrange.Row, "AL" & findrange.Row).Value
            ' Find next match
            Set findrange = ThisWorkbook.Sheets("Sheet1").Columns("A").FindNext(findrange)
            ' Loop until the Find has wrapped back around, or value not found any more
        Loop While Not findrange Is Nothing And findrange.Address <> firstaddress
    End If
    Application.ScreenUpdating = True
    Application.Calculation = xlCalculationAutomatic
End Sub

app.module.ts

import { Component } from '@angular/core';
import { HomePage } from '../home/home';
import { AboutPage } from '../about/about';
import { ContactPage } from '../contact/contact';
import { InfoPage } from '../info/info';

@Component({
templateUrl: 'tabs.html'
})
export class TabsPage {
tab1Root: any = HomePage;
tab2Root: any = AboutPage;
tab3Root: any = ContactPage;
tab4root: any = InfoPage;
constructor() {
}
}

tabs.html

<ion-tabs>
<ion-tab [root]="tab1Root" tabTitle="Home" tabIcon="home"></ion-tab>
<ion-tab [root]="tab2Root" tabTitle="Geo" tabIcon="md-globe"></ion-tab>
<ion-tab [root]="tab3Root" tabTitle="Contact" tabIcon="contacts"></ion-tab>
<ion-tab [root]="tab4Root" tabTitle="info" tabIcon="football"></ion-tab>
</ion-tabs>

enter image description here

0 个答案:

没有答案