简体   繁体   English

如何使用mdl-select和md-option

[英]How to use mdl-select and md-option

I've been using angular2-mdl for a while and it's brilliant, now I want to also use @angular2-mdl-ext on a project using systemjs but am having trouble and get errors indicating mdl-select and mdl-option is not known in component. 我已经有一段时间使用angular2-mdl了,这很了不起,现在我想在使用systemjs的项目中也使用@ angular2-mdl-ext,但是遇到麻烦并出现错误,表明不知道mdl-select和mdl-option在组件中。 I did an import of MdlSelectModule on the component but it does not help. 我在组件上导入了MdlSelectModule,但这无济于事。

How should I specify this in app.module.ts and and systemjs.config.js, all attempts at getting it to resolve have failed thus far. 我应该如何在app.module.ts和systemjs.config.js中指定它,到目前为止,所有试图使其解析的尝试都失败了。

I tried import MdlSelectModule in app.module.ts but keep etting a 404 error which tells me systemjs is not configured properly....? 我尝试在app.module.ts中导入MdlSelectModule,但一直出现404错误,告诉我systemjs配置不正确。

An example indicatig how to specify in systemjs.config.js and app.module.ts would be appreciated. 一个示例indicatig如何在systemjs.config.js和app.module.ts中进行指定将不胜感激。

Thanks, 谢谢,

Resolved this by setting mapping in systemjs as follows 通过在systemjs中设置映射来解决此问题,如下所示

'@angular2-mdl-ext/select': 'npm:@angular2-mdl-ext/select/index.umd.js', '@ angular2-mdl-ext / select':'npm:@ angular2-mdl-ext / select / index.umd.js',

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM