方法" date"您尝试访问的内容在类声明中不存在

时间:2017-04-03 18:18:18

标签: angular webpack tslint

这是一个愚蠢的问题,但这里有一个:

  

./ SPA /应用/富/富列表/富-list.component.ts   (发出的值而不是错误的实例)[19,56]:方法" date"您正在尝试访问的内容在类声明中不存在。

我使用角度与日期管道,角度本身集成。

>>> from sklearn.feature_extraction.text import TfidfVectorizer >>> docs = [] >>> docs.append("this is sentence number one") >>> docs.append("this is sentence number two") >>> vectorizer = TfidfVectorizer(norm='l2',min_df=0, use_idf=True, smooth_idf=True, stop_words='english', sublinear_tf=True) >>> x = vectorizer.fit_transform(docs) >>> x.todense() matrix([[ 0.70710678, 0.70710678], [ 0.70710678, 0.70710678]]) >>> vectorizer.vocabulary_['sentence'] 1 >>> c = vectorizer.vocabulary_['sentence'] >>> x[:,c] <2x1 sparse matrix of type '<class 'numpy.float64'>' with 2 stored elements in Compressed Sparse Row format> >>> x[:,c].todense() matrix([[ 0.70710678], [ 0.70710678]])

tslint产生了令人讨厌的警告。我使用带有tslint-loader的webpack。

嗯,有什么建议吗? :)

1 个答案:

答案 0 :(得分:0)

您的组件“foo-list.component.ts”中的项目不是私有的吗?