Angular Typescript UWP 无法使用 C# WinRT 组件 类
Angular Typescript UWP Cannot Use C# WinRT component classes
我有一个正在使用 Angular5 开发的 UWP 应用程序。我希望该应用程序使用 Windows 运行时组件(通用)classes 来访问来自 table 的数据。
像这样
import { Component,OnInit } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
title = 'app';
ngOnInit() {
var test = new AngularUWP.RuntimeComponent.TestClass();
let world = test.testFunction();
}
}
现在,当我构建时,出现错误“TS2304:找不到名称 'AngularUWP'
如何解决这个问题。
Github 示例项目 here
或
我只希望我的 angular 编译器在找到这些 class 名称时原封不动地跳过它们
我最终将名称 AngularUWP 声明为常量。
declare const AngularUWP:any;
我有一个正在使用 Angular5 开发的 UWP 应用程序。我希望该应用程序使用 Windows 运行时组件(通用)classes 来访问来自 table 的数据。 像这样
import { Component,OnInit } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
title = 'app';
ngOnInit() {
var test = new AngularUWP.RuntimeComponent.TestClass();
let world = test.testFunction();
}
}
现在,当我构建时,出现错误“TS2304:找不到名称 'AngularUWP' 如何解决这个问题。 Github 示例项目 here
或
我只希望我的 angular 编译器在找到这些 class 名称时原封不动地跳过它们
我最终将名称 AngularUWP 声明为常量。
declare const AngularUWP:any;