首页 > 解决方案 > 离子服务命令登陆到 balnk 屏幕

问题描述

我运行命令“离子服务”降落到空白屏幕。我已经使用“npm install”安装了所有节点模块,然后运行“ionic serve”

[app-scripts] [11:28:17]  tslint: ...p_source_code/ionicecommerce_muzammul/src/pages/select-country/select-country.ts, line: 8
[app-scripts]             All imports on this line are unused.
[app-scripts]        L7:  import { ConfigProvider } from '../../providers/config/config';
[app-scripts]        L8:  import { Http } from '@angular/http';
[app-scripts]        L9:  import { LoadingProvider } from '../../providers/loading/loading';
[app-scripts] [11:28:17]  tslint: ...f/app_source_code/ionicecommerce_muzammul/src/pages/select-zones/select-zones.ts, line: 8
[app-scripts] [11:28:17]  tslint: .../Users/Saif/app_source_code/ionicecommerce_muzammul/src/auth/auththentication.ts, line: 2
[app-scripts] [11:28:17]  tslint: .../Users/Saif/app_source_code/ionicecommerce_muzammul/src/auth/auththentication.ts, line: 3
[app-scripts] [11:28:17]  tslint: .../Saif/app_source_code/ionicecommerce_muzammul/src/pages/my-account/my-account.ts, line: 53
[app-scripts]             All imports on this line are unused.
[app-scripts]        L7:  import { ConfigProvider } from '../../providers/config/config';
[app-scripts]        L8:  import { Http } from '@angular/http';
[app-scripts]        L9:  import { LoadingProvider } from '../../providers/loading/loading';
[app-scripts]             All imports on this line are unused.
[app-scripts]        L1:  import { Injectable } from '@angular/core';
[app-scripts]        L2:  import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
[app-scripts]        L3:  import { Observable } from 'rxjs/Observable';
[app-scripts]             All imports on this line are unused.
[app-scripts]        L2:  import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
[app-scripts]        L3:  import { Observable } from 'rxjs/Observable';
[app-scripts]        L4:  @Injectable()
[app-scripts]             'currenrtPassword' is declared but never used.
[app-scripts]       L52:  //this.shared.customerData.password="1234"
[app-scripts]       L53:  let currenrtPassword = this.myAccountData.currentPassword;
[app-scripts]       L54:  let newPassword = this.myAccountData.password;
[app-scripts]             'newPassword' is declared but never used.
[app-scripts]       L53:  let currenrtPassword = this.myAccountData.currentPassword;
[app-scripts]       L54:  let newPassword = this.myAccountData.password;
[app-scripts]       L55:  // console.log(currenrtPassword + "  " + newPassword);
[app-scripts]             'require' is declared but never used.
[app-scripts]       L22:  declare var braintree;
[app-scripts]       L23:  declare var require: any
[app-scripts]       L24:  declare var Buffer: any
[app-scripts]             'Buffer' is declared but never used.
[app-scripts]       L23:  declare var require: any
[app-scripts]       L24:  declare var Buffer: any
[app-scripts] [11:28:17]  tslint: .../Saif/app_source_code/ionicecommerce_muzammul/src/pages/my-account/my-account.ts, line: 54
[app-scripts] [11:28:17]  tslint: C:/Users/Saif/app_source_code/ionicecommerce_muzammul/src/pages/order/order.ts, line: 23
[app-scripts] [11:28:17]  tslint: C:/Users/Saif/app_source_code/ionicecommerce_muzammul/src/pages/order/order.ts, line: 24
[app-scripts] [11:28:17]  lint finished in 6.25 s

运行 ionic serve 后,我在控制台窗口和浏览器上打开了空白屏幕。开发服务器在 localhost:8100 上运行

标签: ionic-frameworkionic3

解决方案


嘿,您的代码未使用declarations,并且imports

tslint 在您的代码编辑器中添加一个名为它将显示 lint 问题的插件

例如:-->

import { LoadingProvider } from '../../providers/loading/loading';
[app-scripts]             All imports on this line are unused.

推荐阅读