我可以在Aurelia中将类型解析为自定义名称吗?

时间:2016-08-08 01:04:48

标签: dependency-injection aurelia

我写了这个

@singleton("httpBasicAuth")
export class HttpBasicAuthentication {...}

但是当我打电话时

container.get("httpBasicAuth")

它只返回"httpBasicAuth",我看到container._resolvers{"httpBasicAuth" => StrategyResolver}hasResolver("httpBasicAuth")返回true

如何使用字符串键HttpBasicAuthentication检索httpBasicAuth

0 个答案:

没有答案