小编Ami*_*eza的帖子

hottowel(durandal)+打字稿

这是我的第一篇文章,祝我好运:)

我想使用热毛巾(durandal)+打字稿,我遵循这些线程: - 我怎么用-a-class-for-my-shell-viewmodel-in-durandal - how-to-use-fancybox-与durandal-en-typescript组合 - 错误 - 这是在选择中

并尝试了DurandalTypescriptExample示例

此示例不会运行此错误:

"'''应用程序中的服务器错误.

无法找到该资源."

起初我决定只使用typescript更改我的viewmodels,然后在那个shell之后,但在这两种情况下我都遇到了这个错误:

这是我的shell.ts代码(我从这个示例中使用):

/// <reference path="../durandal/durandal.d.ts" />

import _router = module('durandal/plugins/router');
import app = module('durandal/app');

export var router = _router;

export function search() {
    app.showMessage('Search not yet implemented...');
}
export function activate() {
    return router.activate('welcome');
}
Run Code Online (Sandbox Code Playgroud)

我收到了这个错误:

- JavaScript runtime error: 'exports' is undefined
Run Code Online (Sandbox Code Playgroud)

任何的想法?

如果可行,可行的解决方案是值得赞赏的.

thanx伙伴们让我们看看会发生什么.

typescript durandal hottowel

6
推荐指数
1
解决办法
5518
查看次数

标签 统计

durandal ×1

hottowel ×1

typescript ×1