笨功夫

IDE 推荐vscode

1,visual studio code 中隐藏从 ts 文件生成的 js 文件和 map 文件

typescript 文件编译产生的 js 和 map 文件不需要手工编辑,打开【文件】【首选项】【工作区设置】,放入以下代码:

// 将设置放入此文件中以覆盖默认值和用户设置。

{

"files.exclude": {

    // exclude .js and .js.map files, when in a TypeScript project

    "node\_modules": true,

    "\*\*/\*.js": { "when": "$\(basename\).ts"},

    "\*\*/\*.js.map": true

}

}

注意加粗文字,确保设置正确。

2,在xml模板中,一定注意闭合标签,不要有多余的空格

3,注意装饰器 一定要加(),如 @Injectable()

4,import "rxjs/add/operator/map" 小心错写成operation

5, this.page.backgroundImage = "res://bg_login"; 可以访问对应android Resource各目录下的图片资源

results matching ""

    No results matching ""