Giter Site home page Giter Site logo

Comments (6)

connecttheworld avatar connecttheworld commented on July 18, 2024

Which version of Angular 2 are you trying to integrate with. The official release or a RC version? It makes a difference if your version of Angular 2 uses NgModules or not.

from ng2-datepicker.

cukingpro avatar cukingpro commented on July 18, 2024

Hi
I'm using Angular RC 5 and it uses ngModule
When I imported to the module. It said cannot find module ng2-datepicker

from ng2-datepicker.

connecttheworld avatar connecttheworld commented on July 18, 2024

@cukingpro If you look at the package.json, ng2-datepicker uses Angular RC.4, which doesn't use NgModule if I'm not mistaken. So there is no ng2-datepicker module. Check out the comments from #49 .

I think you need in the module where you are using the datepicker.

import {DatePicker} from 'ng2-datepicker/ng2-datepicker';

@NgModule({
  ...,
  declarations: [DatePicker, ...],
  ...
})

from ng2-datepicker.

jkuri avatar jkuri commented on July 18, 2024

That's right. This should work with Angular 2.0.0.

from ng2-datepicker.

nenych avatar nenych commented on July 18, 2024

Hello.
I use angular 2.0.0-rc.5. Can someone explain how to use this module?
In my app.mosule.ts I did:
import { DatePicker } from '../node_modules/ng2-datepicker/ng2-datepicker';
...
@NgModule({
...,
declarations: [DatePicker, ...],
...
})

But after compilation I got an error:
Error: SyntaxError: Unexpected token <
at Object.eval (http://10.10.17.179:8181/js/app.module.js:16:24)
at eval (http://10.10.17.179:8181/js/app.module.js:50:4)
at eval (http://10.10.17.179:8181/js/app.module.js:51:3)
Evaluating http://10.10.17.179:8181/node_modules/ng2-datepicker/ng2-datepicker
Evaluating http://10.10.17.179:8181/js/app.module.js
Evaluating http://10.10.17.179:8181/js/main.js
Error loading http://10.10.17.179:8181/js/main.js

from ng2-datepicker.

jkuri avatar jkuri commented on July 18, 2024

#62

from ng2-datepicker.

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.