Giter Club home page Giter Club logo

Comments (15)

hverma avatar hverma commented on August 23, 2024 1

@bartholomej Thx it works now! Please close the issue.

from ngx-scrolltop.

bartholomej avatar bartholomej commented on August 23, 2024 1

@slst19 @hverma ngx-scrolltop v2.4.0 has just been released.
Let me know how it works with your angular 7 setup ;)

npm install ngx-scrolltop
# yarn add ngx-scrolltop

from ngx-scrolltop.

bartholomej avatar bartholomej commented on August 23, 2024

@hverma This issue should be fixed in v0.8.3. There was some incompatibility with TypeScript versions.

But I am afraid there was another breaking change in ng8 which causes incompatibility with older Angular. I'll try to fix it as well.

Anyway, let me know how it works now in your Angular 7 app (latest package v0.8.3)

from ngx-scrolltop.

bartholomej avatar bartholomej commented on August 23, 2024

All issues connected with Angular 5+ compatibility should be fixed in version 1.0.0-beta.3

npm install ngx-scrolltop@next

You can see demo with ng7 here: https://stackblitz.com/edit/angular7-ngx-scrolltop-ttomxv?file=package.json

@hverma I am waiting for your feedback. Let me know how it works ;)

from ngx-scrolltop.

bartholomej avatar bartholomej commented on August 23, 2024

Version v1.0.0-rc.1 should be compatible with Angular 5 – 10. And maybe with Angular 4 as well 🤷‍♂️ 😃

npm i ngx-scrolltop@next

Stable version v1.0.0 will be released tomorrow. Thx @hverma

from ngx-scrolltop.

hverma avatar hverma commented on August 23, 2024

@bartholomej wondering if the latest versions will also support Angular 7. I am currently getting this error for version 2.0.0

ERROR in node_modules/ngx-scrolltop/lib/ngx-scrolltop.component.d.ts(8,9): error TS1086: An accessor cannot be declared in an ambient context.

from ngx-scrolltop.

bartholomej avatar bartholomej commented on August 23, 2024

@hverma I always try the current version of ngx-scrolltop with Angular versions 6 and 7. According to the latest tests, it seems to work in both versions, as you can see here:
https://stackblitz.com/edit/angular6-ngx-scrolltop?file=package.json
https://stackblitz.com/edit/angular7-ngx-scrolltop?file=package.json

Can you provide more information, please? Have you tried it with "hello world" Angular 7 app?

Thank you for your feedback ;)

from ngx-scrolltop.

slst19 avatar slst19 commented on August 23, 2024

@bartholomej Even I'm getting same error. Please help. I'm trying on the latest version 2.3.1.
ERROR in node_modules/ngx-scrolltop/lib/ngx-scrolltop.component.d.ts(8,9): error TS1086:
An accessor cannot be declared in an ambient context.

from ngx-scrolltop.

bartholomej avatar bartholomej commented on August 23, 2024

@slst19 hi, what is your Angular version?

Can you show what dependencies you have in the package.json?
I need to know @angular/*, rxjs, TypeScript

Thx

from ngx-scrolltop.

slst19 avatar slst19 commented on August 23, 2024

@bartholomej Hi, Please find the package.json
"dependencies": {
"@angular-material-components/datetime-picker": "^2.0.4",
"@angular/animations": "7.2.14",
"@angular/cdk": "^7.3.7",
"@angular/common": "7.2.14",
"@angular/compiler": "7.2.14",
"@angular/core": "7.2.14",
"@angular/forms": "7.2.14",
"@angular/http": "7.2.14",
"@angular/material": "^7.3.7",
"@angular/platform-browser": "7.2.14",
"@angular/platform-browser-dynamic": "7.2.14",
"@angular/router": "7.2.14",
"@azure/msal-angular": "^1.1.2",
"@ng-bootstrap/ng-bootstrap": "^4.1.2",
"@ng-idle/core": "^6.0.0-beta.5",
"@swimlane/ngx-datatable": "^14.0.0",
"@types/file-saver": "2.0.0",
"angular-moment-timezone": "^1.7.1",
"angular2-moment": "^1.7.1",
"babel-polyfill": "^6.26.0",
"blueimp-canvas-to-blob": "^3.14.0",
"bootstrap": "4.3.1",
"classlist.js": "^1.1.20150312",
"core-js": "^2.5.3",
"es6-promise": "^4.2.8",
"exif-js": "^2.3.0",
"file-saver": "^2.0.1",
"font-awesome": "^4.7.0",
"hammerjs": "^2.0.8",
"isomorphic-fetch": "^2.2.1",
"jsrsasign": "^8.0.12",
"lodash": "^4.17.11",
"moment": "^2.20.1",
"msal": "^1.4.6",
"ng2-datetime": "^1.4.0",
"ng2-imageupload": "^1.4.2",
"ng2-input-autocomplete": "0.3.5",
"ngx-mask": "8.2.0",
"ngx-webstorage-service": "^4.1.0",
"pica": "^5.1.0",
"rxjs": "^6.5.1",
"time-ago-pipe": "^1.2.1",
"tslib": "^1.9.0",
"web-animations-js": "^2.3.1",
"zone.js": "^0.8.29"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.13.0",
"@angular/cli": "7.3.8",
"@angular/compiler-cli": "7.2.14",
"@angular/language-service": "7.2.14",
"@types/jasmine": "3.3.12",
"@types/node": "^11.13.13",
"codelyzer": "4.0.2",
"jasmine-core": "^3.4.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "^4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~2.0.0",
"karma-coverage-istanbul-reporter": "^2.0.5",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "~5.4.2",
"ts-node": "^4.1.0",
"tslint": "^5.9.1",
"typescript": "3.2.4"
}

from ngx-scrolltop.

slst19 avatar slst19 commented on August 23, 2024

@bartholomej I have tried updating it to 8.2 but even there no luck. I get same error. Below is the new package.json
"dependencies": {
"@angular-material-components/datetime-picker": "^2.0.4",
"@angular/animations": "8.2.14",
"@angular/cdk": "^8.2.3",
"@angular/common": "8.2.14",
"@angular/compiler": "8.2.14",
"@angular/core": "8.2.14",
"@angular/forms": "8.2.14",
"@angular/http": "7.2.14",
"@angular/material": "^8.2.3",
"@angular/platform-browser": "8.2.14",
"@angular/platform-browser-dynamic": "8.2.14",
"@angular/router": "8.2.14",
"@auth0/angular-jwt": "3.0.1",
"@azure/msal-angular": "^1.1.2",
"@ng-bootstrap/ng-bootstrap": "^5.3.1",
"@ng-idle/core": "^6.0.0-beta.5",
"@swimlane/ngx-datatable": "^14.0.0",
"@types/file-saver": "2.0.0",
"angular-moment-timezone": "^1.7.1",
"babel-polyfill": "^6.26.0",
"blueimp-canvas-to-blob": "^3.14.0",
"bootstrap": "4.3.1",
"classlist.js": "^1.1.20150312",
"core-js": "^2.5.3",
"es6-promise": "^4.2.8",
"exif-js": "^2.3.0",
"file-saver": "^2.0.1",
"font-awesome": "^4.7.0",
"hammerjs": "^2.0.8",
"isomorphic-fetch": "^2.2.1",
"jsrsasign": "^8.0.12",
"lodash": "^4.17.11",
"moment": "^2.20.1",
"msal": "^1.4.6",
"ng2-datetime": "^1.4.0",
"ng2-imageupload": "^1.4.2",
"ng2-input-autocomplete": "0.3.5",
"ngx-mask": "8.2.0",
"ngx-scrolltop": "^2.3.1",
"ngx-webstorage-service": "^4.1.0",
"pica": "^5.1.0",
"rxjs": "^6.5.1",
"time-ago-pipe": "^1.2.1",
"tslib": "^1.9.0",
"web-animations-js": "^2.3.2",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.803.29",
"@angular/cli": "8.3.29",
"@angular/compiler-cli": "8.2.14",
"@angular/language-service": "8.2.14",
"@types/jasmine": "3.3.12",
"@types/node": "^11.13.13",
"codelyzer": "^5.0.1",
"jasmine-core": "^3.4.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "^4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~2.0.0",
"karma-coverage-istanbul-reporter": "^2.0.5",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "~5.4.2",
"ts-node": "^4.1.0",
"tslint": "^5.9.1",
"typescript": "3.5.3"
}

from ngx-scrolltop.

slst19 avatar slst19 commented on August 23, 2024

I have also tried updating the rxjs to the version you are using i.e., 6.6.3. But still same issue.

from ngx-scrolltop.

slst19 avatar slst19 commented on August 23, 2024

Ok issue was typescript version as I can see you are using "typescript": "~4.0.5" because it's on angular 11. May be I need to checkout the old code.

https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3

from ngx-scrolltop.

bartholomej avatar bartholomej commented on August 23, 2024

@slst19 Yes, you're right, it's all about TypeScript compatibility.
I improved the new version to work with typescript 3.x (ngx-scrolltop v2.4.0-rc.0)

Can you try how it works with your Angular 7.x project? @hverma @slst19

Install release candidate:

npm install ngx-scrolltop@next
# yarn add ngx-scrolltop@next 
# ng update ngx-scrolltop@next 

from ngx-scrolltop.

bartholomej avatar bartholomej commented on August 23, 2024

Angular 13 is here and old libraries are deprecated (without ivy).

Since ngx-scrolltop v3, the library is compiled with IVY and fully supports Angular12+ (you can't use this with older Angular version anymore!)

If you still need to use it with an older version of Angular, then use version 2, which is still available: ng add ngx-scrolltop@2

More info in readme

from ngx-scrolltop.

Related Issues (19)

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.