Git Product home page Git Product logo

Comments (17)

jkuri avatar jkuri commented on May 24, 2024

hi @CapriceLi thanks for the report. I will fix that during the weekend, if you find solution before please provide a PR. I am very busy currently and cannot do it before weekend.

from ng-daterangepicker.

CapriceLi avatar CapriceLi commented on May 24, 2024

from ng-daterangepicker.

CapriceLi avatar CapriceLi commented on May 24, 2024

Hi Jan,

As I noticed, you have approved my pr and merging has been automate completed. I'm not sure about the process, but will you release a latest package in npm so that i can update?

from ng-daterangepicker.

jkuri avatar jkuri commented on May 24, 2024

I did already. check version 0.3.0. thanks for the fix!

from ng-daterangepicker.

CapriceLi avatar CapriceLi commented on May 24, 2024

With pleasure~

from ng-daterangepicker.

CapriceLi avatar CapriceLi commented on May 24, 2024

Hi,

Sorry to bother again, but when I tried to build my project with the updated ng-daterangepicker, it failed and the error message is like

'ERROR in Unexpected value 'NgDateRangePickerModule in /Users/Caprice/Documents/xxxxx/node_modules/ng-daterangepicker/lib/src/ng-daterangepicker/ng-daterangepicker.module.d.ts' imported by the module 'AppModule in /Users/Caprice/Documents/xxxxx/src/app/app.module.ts'. Please add a @NgModule annotation.'

I'm not very sure, but is it something wrong occurs at your side?

Looking forward to your response.

from ng-daterangepicker.

jkuri avatar jkuri commented on May 24, 2024

yes I accidentaly published .d.ts files, please try again in 5min.

from ng-daterangepicker.

jkuri avatar jkuri commented on May 24, 2024

okay try now please

from ng-daterangepicker.

CapriceLi avatar CapriceLi commented on May 24, 2024

still failed...

'zone.js:654 Unhandled Promise rejection: Failed to load ng-daterangepicker.component.html ; Zone: ; Task: Promise.then ; Value: Failed to load ng-daterangepicker.component.html undefined'

from ng-daterangepicker.

jkuri avatar jkuri commented on May 24, 2024

please use @angular/cli or @ngtools/webpack.

from ng-daterangepicker.

CapriceLi avatar CapriceLi commented on May 24, 2024

well.. I am using @angular/cli to scaffold my project right now. What do you exactly mean by using @angular/cli?

from ng-daterangepicker.

jkuri avatar jkuri commented on May 24, 2024

not sure why it is then looking for template file while it is already compiled and inlined. tought you are using systemjs. can you show me how do you import the module?

from ng-daterangepicker.

CapriceLi avatar CapriceLi commented on May 24, 2024

sure.
test.component.ts
import { NgDateRangePickerOptions } from 'ng-daterangepicker';

app.module.ts

import { NgDateRangePickerModule } from 'ng-daterangepicker';
..
@NgModule({
...,
imports: [...,NgDateRangePickerModule,]

It's basically the same as when I used version 0.2.0. But when I used 0.2.0 it works just fine.

from ng-daterangepicker.

CapriceLi avatar CapriceLi commented on May 24, 2024

Hi,

I misunderstood a little bit of your last comment. For your information, I'm not using system.js. I tried to implement 0.3.1 package on other projects, but the results seems the same.

So.. are you gonna fix this?

from ng-daterangepicker.

jkuri avatar jkuri commented on May 24, 2024

hi @CapriceLi. sure I will check whats going on, maybe the module is not compiled alright.

from ng-daterangepicker.

jkuri avatar jkuri commented on May 24, 2024

@CapriceLi I solved it by adding

"paths": {
  "@ng-daterangepicker/*": ["../node_modules/ng-daterangepicker/src/ng-daterangepicker"]
}

to src/tsconfig.app.json configuration.

Then I used

// app.module.ts
import { NgDateRangePickerModule } from '@ng-daterangepicker/ng-daterangepicker.module';
// app.component.ts
import { NgDateRangePickerOptions } from '@ng-daterangepicker/ng-daterangepicker.component';

as imports.

I am attaching sample angular-cli project for reference. I hope that helps!
proj.zip

from ng-daterangepicker.

CapriceLi avatar CapriceLi commented on May 24, 2024

Perfectly works now, thank you so much!

from ng-daterangepicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.