Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 30 10:39
    akshaypatidar455 commented #1094
  • 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
RAJA MALIK
@raajamalik
but still not luck
Josoroma
@josoroma

Hi Hackers!

I am trying to know where is the right place to properly import and pass as a dependency the angular material package, I just found this:

AngularClass/NG6-starter@ced8cff

so app.js is the right place to import this module?

sorry wrong room, I am going to move this question to ng6-starter
thanks
Alla Abramova
@movadee
hey guys! can someone please help? i am getting error: uncaught Error: Couldn't find Materialize object on window. It is created by the materialize-css library. Please import materialize-css before importing angular2-materialize.
Marinho Brandão
@marinho
hi @lyalyaka did you try importing materialize-css inside vendor.browser.ts ?
I don’t use Materialize, but with Fontawesome I added this line to my main.browser.ts(don’t remember why in main.browser.ts though):
require('../node_modules/font-awesome/css/font-awesome.css');
roelleor
@roelleor

Hi there, hopefully someone can answer my question:
I see the webpack config uses a custom attribute: metadata. However, if I try to add this in another project (which is not a seed from this repos) I get the warning:
"configuration has an unknown property 'metadata’.”

My question is: How did you guys make webpack accept that custom attribute?

Steven Demurjian Jr.
@sdemurjian
when in development mode, how do i serve the webpack assets with a custom server (not using webpack servers)? since they are not stored on the file system
right now i have a development server that acts only as an API server on a different port, and when in production i serve the compiled bundles
pigeont
@PigeonT
hi, how to use angular2 with webpack together?
I need some help
Are u using webpack or systemjs?
Dan Cancro
@dancancro

Hi all. I'd like to make an app with Angular 2 and Redux. How do practitioners of this starter use it with Redux?

From my view of other Angular2+Redux starters, I get the feeling that it totally changes the structure of an app from files being grouped by feature to being grouped by file type.

Marinho Brandão
@marinho
hi @dancancro , this is the structure I have (different than standard suggested by Redux team):
src
src/app
src/app/store
src/app/store/feature1
src/app/store/feature1/feature1.actions.ts
src/app/store/feature1/feature1.reducers.ts
src/app/store/feature1/feature1.state.ts
src/app/store/feature1/feature1.models.ts
*.models.ts only when necessary
Dan Cancro
@dancancro
@marinho are there any specific reasons for your departure from their way?
Marinho Brandão
@marinho

inside store, I have also:

src/app/store/app.state.ts
src/app/store/reducers.ts

both grouping the others respective feature files

by this way, each feature is self contained as one package, it looks more organised and scalable
(scalable in terms of file structure)
other key information: angular2-webpack-starter has a app.state.ts to manage the HMR state, but it has nothing to do with the Redux’ app state interface… I suggest you to rename it to prevent confusion
Dan Cancro
@dancancro
where would you put feature1's component, module, template, and css files?
Marinho Brandão
@marinho
they aren’t part of the global state, they go to the normal places they would be
the idea is to keep everything under Redux’ domain inside src/app/store as that defines the app’s global state
Dan Cancro
@dancancro
so you have some feature1 files under src/app/store/feature1 and others under, src/app/feature1? what sort of havok would it cause if you put all of feature1's files in src/app/feature1?
Marinho Brandão
@marinho
you can do that too, no issue, but then you start to mix global state with components, which goes against the idea of a component-oriented approach
because when I say “feature1”, I don’t mean “feature1.component”’s state… what I mean is a feature from the state point of view, which mostly don’t coincide with feature structure
Dan Cancro
@dancancro
hmm, to me putting all things concerned with a component in one place complies with component-orientation better. no?
Marinho Brandão
@marinho

for example, you may have

  • home.component
  • kpis.component
  • map.component
  • sites-list.component

and then your global state is:

  • towns
  • sites
  • buildings
  • aggregations

so, just because some features will coincide in name with state keys, it doesn’t mean that’s a rule

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