1
聲明隨着angular2應用程序,我已經安裝了tslint延長我的VS代碼之後出現,公共實例成員函數的聲明不允許私有實例成員函數
的應用程序工作正常,但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
配置文件:對象= {0}配置文件:'http://www.appresume.com/cv_templates/cv_2_1/conf/images/profile.jpg', 姓氏:'約翰', 姓氏:'Doe', detailUrl:'' }; – Sajeetharan