我有 sharepoint 插件项目,我已经包含了必要的 angular2 包和 ts 文件,正如您在下面看到的解决方案资源管理器的 ss:
这是我的 ts 文件内容;引导.ts
import {bootstrap} from 'angular2/platform/browser';
import {AppComponent} from './app.component';
bootstrap(AppComponent)
app.component.ts
import {Welcome} from './app.module';
import {Component} from 'angular2/core';
@Component({
selector: 'app-main',
template:'<h1>${Welcome.getMessage()}</h1>'
})
export class AppComponent {}
app.module.ts
export class Welcome {
static getMessage() {
return "Hello World!";
}
}
当我运行此应用程序时,我总是在输出窗口中收到此错误消息:
> @"Error 1
> CorrelationId: ae2bcaba-cdac-4178-bd39-2aca278a2e31
> ErrorDetail: There was a problem with activating the app web definition.
> ErrorType: App
> ErrorTypeName: App Related
> ExceptionMessage: Failed to instantiate file "app.module.ts" from module "RootModule": Source path
> "Features\SharePointAddIn4_Feature1\app.module.ts" not found.
> Source: AppWeb
> SourceName: App Web Deployment
我有搜索但找不到任何解决方案帮助我..知道如何解决这个问题吗?