它显示了错误:
无法确定C:/Users/HP/Desktop/default-2/default/src/app/content/pages/header/action/aslaAction/aslaActionURL/asla-url-action.component.ts!中CCURLActionComponent类的模块将CCURLActionComponent添加到NgModule以修复它。
@Component({
selector: 'm-action',
templateUrl: './cc-url-action.component.html',
providers: [PagesService],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class CCURLActionComponent implements OnInit {
htmlContent = '';
textAnalyticsInput:any;
textAnalyticsResponse:any;
polarity:any;
}以上代码与ts文件中的cc-url-action.component和asla-url-action.component代码相同。
在pages.module.ts中:
import { CCURLActionComponent } from "./header/action/CCAction/CCActionURL/cc-url-action.component";
@NgModule({
declarations: [
PagesComponent,
ActionComponent,
ActionURLComponent,
CCURLActionComponent发布于 2019-04-15 07:29:56
通过改变这个问题解决了这个问题-
在aslaURLActionComponent组件中:
@Injectable()导出类aslaURLActionComponent扩展CCURLActionComponent实现OnInit {}
在Ng模块中:-
@NgModule({声明: PagesComponent、ActionComponent、ActionURLComponent、CCURLActionComponent、aslaURLActionComponent })
https://stackoverflow.com/questions/55376006
复制相似问题