Code Monkey home page Code Monkey logo

ng2-vs-for's People

Contributors

danielmatthew avatar jsen- avatar kamilkp avatar wojtekwoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ng2-vs-for's Issues

updated to work with Angulr RC4?

I am getting an error during ngOnInit() in getClientSize: Can't read property 'clientHeight' of null. ElementRef's use is strongly cautioned in the Angular documentation. Is it somehow not working due to RC4?

Cannot load in angular 2.4.0

It gives following error while using with "@angular/core": "2.4.0",
Cannot find module 'ng2-vs-for'.
Object literal may only specify known properties, and 'directives' does not exist in type 'Component'.

error - Maximum call stack size exceeded

If there was live demo example with code, it would help a lot.

I'm getting error after some rows displayed

Is following setup correct?

inside class constructor

        var arr = [];
        for(var i=1; i<=100; i++) {
            arr.push(i.toString());
        }

        this.test = arr;

template file

    <div *vsFor="test; #test = vsCollection; #_startIndex = vsStartIndex">
        <div *ngFor="#item of test; #i = index">
            {{ i + _startIndex }}
            within loop<br/>
        </div>
    </div>

the above code does show numbers, but from 1 to 61 (not 100) and throw following error in console log.

image

virtual scroll does not work if scrollable area is the document itself

The scroll binding does not work, calculation visible items fails.
I am working on getting it to work properly when scrolling the document. The scrollbar itself jagges a lot when scrolling, though the heights of the individual items is calculated properly. I am still investigating that issue.

Upgrade typescript support

I'd like to upgrade typescript support for this library to 2.3, but from the open pull requests it's not clear anyone is accepting contributions. Is there any maintainer who would be willing to merge a pull request?

ionic build browser --prod causes error

When I do a production build, using Ionic 3, I get this error:

ionic-app-script task: "build"
[13:08:32]  Error: Error encountered resolving symbol values statically. Could not resolve ng2-vs-for relative to
            C:/MyApp/src/app/app.module.ts., resolving symbol AppModule in
            C:/MyApp/src/app/app.module.ts, resolving symbol AppModule in
            C:/MyApp/src/app/app.module.ts
Error: Error encountered resolving symbol values statically. Could not resolve ng2-vs-for relative to C:/MyApp/src/app/app.module.ts., resolving symbol AppModule in C:/MyApp/src/app/app.module.ts, resolving symbol AppModule in C:/MyApp/src/app/app.module.ts
    at Error (native)
    at syntaxError (C:\MyApp\node_modules\@angular\compiler\bundles\compiler.umd.js:1513:34)
    at simplifyInContext (C:\MyApp\node_modules\@angular\compiler\bundles\compiler.umd.js:23316:23)
    at StaticReflector.simplify (C:\MyApp\node_modules\@angular\compiler\bundles\compiler.umd.js:23328:13)
    at StaticReflector.annotations (C:\MyApp\node_modules\@angular\compiler\bundles\compiler.umd.js:22794:60)
    at NgModuleResolver.resolve (C:\MyApp\node_modules\@angular\compiler\bundles\compiler.umd.js:13352:70)
    at CompileMetadataResolver.getNgModuleMetadata (C:\MyApp\node_modules\@angular\compiler\bundles\compiler.umd.js:13937:60)
    at addNgModule (C:\MyApp\node_modules\@angular\compiler\bundles\compiler.umd.js:22526:58)
    at C:\MyApp\node_modules\@angular\compiler\bundles\compiler.umd.js:22537:14
    at Array.forEach (native)

How could I solve this error?

angular 2 final release support

Hi,
I wonder why this awesome component isn't still supported/continued, are you guys switch to another component ? I really need virtual scroll with angular2 finale release.

I try to test to do a demo, I download repo and I don't know how build to see an demo, do you have a demo of this component to see performance?

This is the virtual scroll I find from Google team but unable to do it with angular2 : https://developers.google.com/web/updates/2016/07/infinite-scroller

error on compiling

I'm using version 1.0.11 to go with angular2 beta.

I want to use this plugin for ionic2 app. When I add the following line in my app.ts file. I get the following errors:

import {VsFor} from 'ng2-vs-for';

TypeScript error: app/app.ts(4,21): Error TS2307: Cannot find module 'ng2-vs-for'.
TypeScript error: app/app.ts(23,3): Error TS2345: Argument of type '{ templateUrl: string; providers: (typeof gq | typeof Api)[]; directive: any[]; config: {}; }' is not assignable to parameter of type 'AppMetadata'.
  Object literal may only specify known properties, and 'directive' does not exist in type 'AppMetadata'.

/Users/basit/projects/site.com/github/mobile-app/node_modules/ng2-vs-for/src/ng2-vs-for.ts:1
import {
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'

dynamic size for dynamic content

I have text content for each row, which can be long text or short for each row.

I have read, we can set size:getItemSize as getItemSize method to change dynamic method for each row.

The only question I have in this, how we get different height size for text content? do we use jQuery,height() method or is there some other way for knowing what actual size is for the row? or is there auto size finder?

Update examples

The current examples use an out of date syntax; please update the examples

The component doesn't Deliver Performance

I tried to run it on a list of 10K items, The browser was lagging and stuttering like hell.
Maybe I don't understand how to work with this or maybe this component doesn't deliver.

Scroll area should change when new Content is added to the model

If i have 10000 elements inside a container and the scroll is on the bottom and then I dynamically change the content to be 100 elements (for example a search), the scroll area is not automatically resizing.

The same happens when you are inserting new content, for example content pagination.

The component should be able to autoSize when data is inserted/removed.

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.