首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ng2-tag-input 'tag-input‘不是已知元素角度2

ng2-tag-input 'tag-input‘不是已知元素角度2
EN

Stack Overflow用户
提问于 2017-06-09 14:56:15
回答 0查看 1.7K关注 0票数 2

我正在尝试将ng2-tag-input安装到我的ionic应用程序中。

在使用npm install成功安装之后,下面是我的app.component.ts

代码语言:javascript
复制
import {TagInputModule} from 'ng2-tag-input';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
@NgModule({
    declarations   : [
        MyApp,
    ],
    imports        : [
        CommonModule,
        BrowserModule,
        HttpModule,
        PagesModule,
        TagInputModule,
        BrowserAnimationsModule,
        IonicModule.forRoot(MyApp, {}, {
            // DeepLinker
            // http://blog.ionic.io/deeplinking-in-ionic-apps/
            links: [
                {component: ProfilePage, name: 'Profile', segment: 'profile/:username'},
                {component: PhotoCardComponent, name: 'Photo', segment: 'photo/:id'},
                {component: ChatMessagePage, name: 'Chat', segment: 'chat/:id'},
                {component: TermsPage, name: 'Terms', segment: 'terms'},
            ]
        })
    ],
    exports        : [
        BrowserModule,
        HttpModule,
        TagInputModule
    ],

然后当我跑的时候

代码语言:javascript
复制
ionic serve

出现以下问题

代码语言:javascript
复制
Error: Uncaught (in promise): Error: Template parse errors:
'tag-input' is not a known element:
1. If 'tag-input' is an Angular component, then verify that it is part of this module.
2. If 'tag-input' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
                </ion-select>
            </ion-item>
            [ERROR ->]<tag-input [(ngModel)]="items"></tag-input>

我不确定我做错了什么。有人能帮我指出吗?

EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44451248

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档