Comments (6)
Hi @snowywolfie ,
Which version of the Angular CLI are you using? (run ng version
and post output).
Did you follow steps mentioned in the guide on how to use with CLI?
Also, can you post your tsconfig.json
file?
from ngx-scrollreveal.
angular-cli: 1.0.0-beta.21
node: 6.9.1
os: darwin x64
Yes, I included scrollreveal.js in scripts.
tsconfig.json
{
"compilerOptions": {
"baseUrl": "",
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es6", "dom"],
"mapRoot": "./",
"module": "es6",
"moduleResolution": "node",
"outDir": "../dist/out-tsc",
"sourceMap": true,
"target": "es5",
"typeRoots": [
"../node_modules/@types"
]
}
}
from ngx-scrollreveal.
Ok, i'll have a look tonight, don't have access to my environment right now
from ngx-scrollreveal.
Hi @snowywolfie ,
Regarding the errors you were having while running ng serve
,
the good news is that i was able to reproduce the issue locally.
This is due to the TypeScript Compiler (TSC) complaining about missing types definition for ScrollReveal JS. As this library is being used underneath by my ngs-reveal.service.ts
, the compiler has added a reference to it in generated definition file ngs-reveal.service.d.ts
(1st line). This is the normal behavior of TSC prior to 2.1.
It seems that from v2.1 and later, TSC will no longer complain about missing types definition for a library that doesn't have any (like ScrollReveal JS) provided the package itself is found in node_modules (read Announcing TypeScript 2.1 for more).
So Upgrading your Typescript to 2.1 (tricky!) or Installing typings for scrollreval JS should get you rid of the errors:
npm install @types/scrollreveal --save-dev
I am thinking about a more elegant solution, but until then, that should make the CLI happy again :)
from ngx-scrollreveal.
Cool, It works like charm! I use the second method btw.
Thank you for prompt reply and efforts ! 👍
from ngx-scrollreveal.
Neat-o!
Even better, i've tested with current version of Angular CLI (beta-22-1), and there is no need to install the scrollreveal
typings anymore, it just works out of the box!
There must have been some changes in the ng build/serve
and/or angular customized version of tsc that made this possible.
I will update the docs.
from ngx-scrollreveal.
Related Issues (20)
- Can't bind to 'ngsReveal' since it isn't a known property of 'div' and nothing works HOT 3
- Action required: Greenkeeper could not be activated 🚨 HOT 1
- Issues with config.container HOT 7
- Cannot use NgsRevealModule Module in Angular 16 HOT 2
- Update for Angular 4 HOT 2
- Problem with Angular Universal (Server Side Rendering) HOT 5
- Cannot find namespace 'scrollReveal' HOT 13
- Angular 4.4.5+ HOT 3
- ScrollReveal is not defined in Angular CLI: 1.5.4 HOT 1
- Scrollreveal with custom scrollbar like ng-perfect-scrollbar HOT 1
- Installation instructions for Angular 6 HOT 6
- support scrollreveal 4.0.0 HOT 3
- Demo not working HOT 1
- [Angular] Can't bind to 'ngsSelector' since it isn't a known property of 'div'. HOT 1
- Documentation not working HOT 2
- Cannot use with ngFor and custom directive HOT 7
- Wrong reveal/hide behaviour!!
- How can I use it with lazy module? HOT 2
- Is this ngx-scrollreveal is free for commercial use ? HOT 1
- Error in jest test HOT 6
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 ngx-scrollreveal.