angularjs - Managing Big Data in Angular2 -


i'm following angular2 course having background of sencha extjs framework.

my question pretty easy : angularjs how store , interact big data structures? in course when service retrieving data small , stored in array.

why did mention extjs? because offers classes called store to, name says, store data , query it, possibility of filtering,sorting,mapping , on.

let's make example :

i have list of airports in world , want offer in select. of course setup service injected select offers entire list. then:

-i want filter user go on typing

-the array containing data array of objects other properties after name country or id

which approach follow?

as per comments, here's answer.

in angular 2 have smart components, hosts logic , data, , dumb components pure views, no logic , preferably stateless.

ideally, retrieve data api , deliver smart components either returning whole data or exposing stream rxjs.

an example using rxjs be:

  • a service calling apis , returning observable data
  • a smart component consuming service's data, in form of subscription
  • one or more dumb component in showing data pushed down smart component (acting container)

at point, data manipulation reside either in service or in smart component (it depends on need transform , how). manipulate data, suggest use rxjs offers possibility chain streams , filter, aggregate, map, ... methods. asynchronous.

if can go less complex blocking (it depends on requirements), i'd suggest use lodash, brings methods collections chain, map, filter, , aggregate data.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -