IONIC--项目目录结构

https://blog.csdn.net/sinat_28597179/article/details/79094235

开发工具--Visual Studio Code

 https://code.visualstudio.com/

点击打开文件夹--打开创建的app的目录可查看目录结构

ionic目录结构

 

主要是看SRC目录:(其他作为了解)

pages中about、content、home目录下的html就是app显示的html;<ion-title>--标题,<ion-content>--内容

 

*app--app.module.ts

/**根模块--告诉ionic如何组装应用 */
//引入ionic、angular的系统模块
import { NgModule,ErrorHandler }from'@angular/core';
import { BrowserModule }from'@angular/platform-browser';
import { IonicApp,IonicModule,IonicErrorHandler }from'ionic-angular';

//引入根组件
import { MyApp }from'./app.component';

//引入自定义的组件(页面)
import { AboutPage }from'../pages/about/about';
import { ContactPage }from'../pages/contact/contact';
import { HomePage }from'../pages/home/home';
import { TabsPage }from'../pages/tabs/tabs';

//打包成app后配置启动画面、导航条等的服务--忽略
import { StatusBar }from'@ionic-native/status-bar';
import { SplashScreen }from'@ionic-native/splash-screen';
@NgModule({
    declarations: [//声明组件
        MyApp,
        AboutPage,
        ContactPage,
        HomePage,
        TabsPage
    ],
    imports: [//引入的模块(依赖的模块)
        BrowserModule,
        IonicModule.forRoot(MyApp)
    ],
    bootstrap: [IonicApp],//启动模块
    entryComponents: [//配置不会在模板中使用的组件
        MyApp,
        AboutPage,
        ContactPage,
        HomePage,
        TabsPage
    ],
    providers: [//配置服务
        StatusBar,
        SplashScreen,
        {provide: ErrorHandler,useClass:IonicErrorHandler}
    ]
})

export classAppModule {}

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值