hsuanxyz / ion2-calendar

📅 A date picker components for ionic2 /ionic3 / ionic4
https://hsuanxyz.github.io/demo/ion2-calendar/
MIT License
555 stars 277 forks source link

ion-calendar is not a known element outside of src/app #139

Open jhonatasblue opened 6 years ago

jhonatasblue commented 6 years ago

Ionic version: (check one with "x") [ ] 2.x [ X] 3.x [ ] 4.x

Ion2-calendar mode: (check one with "x") [X ] components mode [ X] modal mode

I'm submitting a ... (check one with "x") [ ] bug report [ ] feature request [X ] help me

Current behavior:

Hello. I've installed the plugin and imported it on app.modules as described. The problem is I'm only able to use component in the app/app.html file. If I try using it anywhere else, like in pages/*.html, the component tag is highlighted in red as an error and the message says:

[Angular] 'ion-calendar' is not a known element:

  1. If 'ion-calendar' is an Angular component, then verify that it is part of this module.
  2. If 'ion-calendar' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

screen shot 2018-02-08 at 20 45 48 screen shot 2018-02-08 at 20 47 52

Expected behavior: Being able to use the calendar component anywhere.

Steps to reproduce: I simply followed the instructions.

ionic info

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : browser 5.0.3
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.0.2
    ios-deploy        : 1.9.2
    Node              : v8.9.1
    npm               : 5.6.0
    OS                : macOS High Sierra
    Xcode             : Xcode 9.2 Build version 9C40b

Environment Variables:

    ANDROID_HOME : /Users/jhonatasrosendo/Library/Android/sdk

Misc:

    backend : legacy
hsuanxyz commented 6 years ago

Lazy loading? need import to your submodule

kiriunin commented 6 years ago

Same here...