Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 13 11:01
    gdams commented #1939
  • Dec 27 2019 08:47
    Druson commented #2049
  • Dec 17 2019 20:59
    rostyslavnikitin opened #2060
  • Dec 16 2019 12:01
    VadimKhismatov opened #2059
  • Dec 14 2019 11:14
    ivan-nemtinov commented #926
  • Dec 14 2019 11:09
    ivan-nemtinov commented #926
  • Dec 13 2019 18:27
    ivan-nemtinov commented #926
  • Dec 13 2019 18:27
    ivan-nemtinov commented #926
  • Dec 09 2019 18:21
    JediSange commented #782
  • Dec 09 2019 16:50
    JediSange commented #782
  • Dec 09 2019 16:50
    JediSange commented #782
  • Dec 05 2019 21:45
    saiMedavarapu commented #1997
  • Nov 07 2019 08:26
    testacp commented #1853
  • Nov 07 2019 08:26
    testacp commented #1853
  • Oct 30 2019 15:24
    emanuelcoelho1986 closed #2011
  • Oct 30 2019 10:43
    sameerpallav commented #2025
  • Oct 15 2019 15:20
    alanhg commented #1997
  • Sep 30 2019 15:12
    bbrink68 commented #2049
  • Aug 23 2019 13:34
    SouravKumar89 edited #2058
  • Aug 23 2019 13:27
    SouravKumar89 opened #2058
Marinho Brandão
@marinho
nope, because the global state isn’t part of the component … it is like an external API the component uses as a third party service
Dan Cancro
@dancancro
ah ok so there are two different sets of 'components' - visual ones and state ones. is that right?
Marinho Brandão
@marinho
what would be a state component?
Dan Cancro
@dancancro
towns
Marinho Brandão
@marinho
nope, towns is just a simple JS array with a couple of JS objects with data
there’s no component inside the state
you must think of the state as a database… it provides data for the components, but the structure isn’t the same
Dan Cancro
@dancancro
i think i got it
Marinho Brandão
@marinho

:) in my example case:

  • towns, sites and buildings would be used by map.component
  • aggregations would be used by kpis.component
  • sites would be used by sites-list.component

so, some state keys are used by multiple components or the other way around

Dan Cancro
@dancancro

ok. would this be more accurate then?

src/app
src/app/store
src/app/store/entityType1
src/app/store/entityType1/entityType1.actions.ts
src/app/store/entityType1/entityType1.reducers.ts
src/app/store/entityType1/entityType1.state.ts
src/app/store/entityType1/entityType1.models.ts

and

src/app
src/app/feature1
src/app/feature1/feature1.module.ts
src/app/feature1/feature1.component.ts
src/app/feature1/feature1.template.ts
src/app/feature1/subfeature/
src/app/feature1/...
Marinho Brandão
@marinho
yep, true… I probably should have avoided the word “feature1” in my example… yours is better
other I suggest from my experience: ng2-redux + Redux.js has an advantage over ngrx: as they use the standard libraries, you can make use of middleware and Chrome Extensions. I don’t know ngrx well, but I’m very happy using some middleware and chrome things
Dan Cancro
@dancancro
i started with ng2-redux but the community is much smaller. it was taking a week to get an answer to a simple question
the ngrx example app works with the developer tools http://ngrx.github.io/example-app
Marinho Brandão
@marinho
well, you can grab some knowledge from ReactJS community though… it’s the same Redux.js… so it works the same way
hummm, just tried and my DevTools tab didn’t work as it does with ng2-redux
I see the black sidebar included in the website working but not the chrome extension in devtools
oops, jsut force-reloaded and it works now… odd
Dan Cancro
@dancancro
it's flakey for me too.
how do you feel about Immutable.js? I had a real struggle working with it when i was trying ng2-redux then asked about it on the ngrx board and was told it was unnecessary complexity
Marinho Brandão
@marinho
I’m using seamless-immutable instead
initially because the legal department on my job blocked ImmutabeJS as it has a patent trap…
but after I realized seamless-immutable is also better because it respects the exact object signature… you can use the arrays and objects with the exact same methods and they work perfectly, while with ImmutabeJS everything is different from standard
Dan Cancro
@dancancro
no kidding? there's a hard to find gotcha
Marinho Brandão
@marinho
what do you mean?
Dan Cancro
@dancancro
whether something has a patent problem is probably not very easy for average folks to find out while they drown in the rest of the variables https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f#.87gsjlb8b
Marinho Brandão
@marinho
hahaha, nice article, just read it few days ago :P
I wouldn’t find it myself either, but in my work there’s a huge legal department analysing every single OSS library/package we request… React and Immutable were caught
Dan Cancro
@dancancro
thanks. i do my best to keep track of these things, but it's overwhelming. if you care to add any other hard-but-good-to-know facts about things, feel free to share them https://docs.google.com/spreadsheets/d/1nMv8TqUx3gUoC3M6BRPB4E4FMTSYGT_OLERguXGjePc/edit#gid=1404564369
Marinho Brandão
@marinho
wow, cool
Dan Cancro
@dancancro
and i made this for making use of the data www.techtradeoffs.info
Marinho Brandão
@marinho
Facebook does that just to protect themselves against future competition and catch some up&coming startups, but I think most React & ImmutableJS users would never have any issue though
interesting
Dan Cancro
@dancancro
last question... the Angular Style guide prescribes having a "core" folder for singleton things and a "shared" folder for multi-instance things. It seems that a Redux store would meet the criteria for going in the core folder. What do you think?
Marinho Brandão
@marinho
I didn’t know about core… jsut about shared, which we use… fair point about core, yes, probably store should be placed in there
tuckerjt07
@tuckerjt07
I'm working with the material2 branch, new to angular 2 and material 2, and cannot figure out where to put the sass file to change the default theme as shown here, https://github.com/angular/material2/blob/master/docs/theming.md
adirzoari
@adirzoari
who knows to make facebook login to app with ionic 2?
Dan Cancro
@dancancro
@marinho in an Angular Redux app, where do you think services that get data should go? The Google Tour of Heroes puts such things into src/app/my-feature/my-feature.service.ts. The ngrx example app puts them into src/app/services. The angular2-webpack-starter puts them in src/app/my-feature/my-feature.service.ts. I'm thinking that database communication is more connected to the store than the UI and so it should go in src/app/core/store/my-feature/my-feature.service.ts among the other store files.
Marinho Brandão
@marinho

hi @dancancro in my case, I used Swagger to generate an API client and that’s the only API service I have. It is generated outside of src by a postinstall npm entry.

Indeed the service is anyhow closer to the application state, but I don’t see them together, as the app state include other stuff that aren’t coming from API, such as calculated values, temporary stuff, cached data, user interactions, etc… I’d better keep the API service in something like src/app/services

Dan Cancro
@dancancro
thanks. i've started thinking of the store as the local backend. i wonder if that'll catch on :smile:
pigeont
@PigeonT
@PigeonT
can i use materialze for free?
I need some help!
any one there?
Marinho Brandão
@marinho

@dancancro I think the idea of a “global app state” is quite plastic. I think most of it is like a local backend, indeed, but not completely, and you probably will find people with different understandings implementing it in different ways.

I’m not very experient on Redux either, so, I’m always curious to see how other people are doing too

Chaikin Evgenii
@fater
Hello friends. Could you recommend a convenient timepicker for angular2?
lilowl
@lilowl
hi, anybody using cloudfront and gzip? I can't seem to get the configuration right. I've read that cloudfront will do this, and I can see the content-encoding response header is getting set, but the filesizes show that it is serving the uncompressed file. I see that some people, just upload the gzipped bundle, without the .gz extension and manually set the content-encoding header in S3 .. any recommendations?
Andriy Komm
@akomm
any suggestion to improve debug information (exception stack) most of the time I get crap and have to blindly guess what might have caused the error. Using maps, but most of the time neither ff nor chrome can make a connection between map and transpiled result
lilowl
@lilowl
folks, I've tried reading the issues, but can't figure out how to include jquery. here's what I've done. 1) npm i jquery --save 2) added import * as $ from 'jquery'; to vendor.browser.ts
I'm getting $ is not a function
Marinho Brandão
@marinho

@lilowl did you add $ to custom-typings.d.ts?

like below:

declare var jQuery;
Javier Richard Cuicapuza Antonio
@Cuica20
Hi everyone!