【发布时间】:2017-01-24 19:41:42
【问题描述】:
使用 angular2 应用程序,我已经为我的 vs 代码安装了 tslint 扩展,
应用运行良好,但 tslint 显示要更正的行,
import { Injectable } from '@angular/core';
@Injectable()
export class UserProfileService{
constructor() {
}
getProfile() {
return this.profile;
}
profile: Object = {
profilePic: 'http://www.appresume.com/cv_templates/cv_2_1/conf/images/profile.jpg',
firstName: 'John',
lastName:'Doe',
detailUrl : ''
};
}
解决方法是什么?
【问题讨论】:
-
是在整个代码中显示还是在特定代码行加了下划线?
-
它为配置文件对象显示
-
profile: Object = { profilePic: 'appresume.com/cv_templates/cv_2_1/conf/images/profile.jpg', firstName: 'John', lastName: 'Doe', detailUrl: '' };试试看,我在“Doe”之前添加了空格。对我来说没有错误。
标签: angular typescript tslint