3
Q以下のサービスで以下のインターフェイスモジュールを使用するにはどうすればよいですか?角2:C#で生成されたモデルをインポート/エクスポートする方法
私はC#から生成された次のモデルを持っている場合:
declare module App.Core.Model {
interface Address extends App.Core.Model.BaseEntity {
addressLine1: string;
addressLine2: string;
addressLine3: string;
area: string;
countryCode: string;
name: string;
postcode: string;
town: string;
}
}
サービス:
ファイルがに住んで// these don't work, get "model.ts error is not a module"
import {Client} from '../interfaces/model';
import {AdminUser} from '../interfaces/model';
import {Building} from '../interfaces/model';
@Injectable()
export class AppService {
...
}
:
- アプリ/インターフェース/モデル。 ts
- app/services/service.ts 012あなたは、次の(ドットはアンダースコアに置き換えられている)を行うことができます
ありがとう、私はちょうど生成されたファイルをクリーンアップし、すべてのinterfこれは痛みになっていたので、個別にエースを行った。乾杯。 – Dave