1
の宣言の後に現れることは許されない、宣言は、私は私の対コードのtslint拡張をインストールしているangular2アプリをプライベートインスタンスメンバ関数
アプリが正常に動作しますが、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 : ''
};
}
修正点は何ですか?
コード全体またはコードの特定の行に下線が表示されていますか? – Habeeb
プロファイルオブジェクト – Sajeetharan
を表示しています。オブジェクト= { profilePic: 'http://www.appresume.com/cv_templates/cv_2_1/conf/images/profile.jpg'、 firstName: 'John'、 lastName : 'Doe'、 detailUrl: '' }; – Sajeetharan