Comments (9)
Hi, after some research I got my project working.
Please note that my project was generated using angular-cli version 1.5.0
So, basically with angular 5, they have changed which TS files would be compiled.
One of these solutions might work for you
- tried to include
./node_modules/ng2-datetime/ng2-datetime.ts
in my tsconfig.app.json, so that it is available during the compilation process - Instead of compiling ng2-datetime.ts in your project with current version of [email protected]; you should import from the compiled module, like this
import {NKDatetimeModule} from 'ng2-datetime/ng2-datetime.js';
Additionally you might get addition error like jQuery is not defined, which can be fixed by including jquery type in compiledOptions of you tsconfig.app.json
So, your tsconfig.app.json would look like this
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "es2015",
"baseUrl": "./",
"types": [
"jquery"
],
"allowSyntheticDefaultImports": true
},
"include": [
"**/*.ts",
"../node_modules/ng2-datetime/ng2-datetime.ts"
],
"exclude": [
"test.ts",
"**/*.spec.ts"
]
}
Let me know if you still face any issues. Thanks.
from ng2-datetime.
I needed to add the last two files below to tsconfig
:
{
"include": [
"**/*.ts",
"../../node_modules/ng2-datetime/ng2-datetime.ts",
"../../node_modules/ng2-datetime/src/ng2-datetime/ng2-datetime.ts",
"../../node_modules/ng2-datetime/src/ng2-datetime/ng2-datetime.module.ts"
]
}
from ng2-datetime.
Same problem here
from ng2-datetime.
Thank you vikasverma92. With your help, I was able to get this to work.
from ng2-datetime.
@tauqeer81 Were you able to make it work?
I will try to setup the demo project with angular cli for the next version
from ng2-datetime.
don't work
from ng2-datetime.
None of these options, nor anything else I've tried as made this ng5 compatible for me during karma tests
from ng2-datetime.
This issue occurs for me when using TS v2.6.x but not with TS v2.5.x.
from ng2-datetime.
None of the above solutions worked for me. What did work was switching to this fork of ng2-datetime.
https://www.npmjs.com/package/ngx-datetime (sorry nkalinov)
from ng2-datetime.
Related Issues (20)
- Highlight days
- SyntaxError: Unexpected token < HOT 1
- Assign a default date HOT 1
- manual input date doesnot get updated to the formcontrol HOT 4
- Timepicker shows seconds even when ShowSeconds is false
- Padding on hours should be removed
- hide disable dates HOT 1
- TimePIcker Binding 24 Hours Format with PM HOT 2
- Breaking Point HOT 2
- Set default “to date” in ng2 datetime “from to datepicker”
- timepicker options not applying as seen in tutorial (specifically for showMeridian) HOT 1
- Changing date does not change model HOT 2
- Cannot read property 'datepicker' of undefined
- bootstrap-timepicker-widget ui issue
- Build error with angular 5 HOT 3
- Autocomplete off
- How to close date-picker manually
- datepicker-dropdown appears empty HOT 1
- date input is empty when it loads
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng2-datetime.