tomastrajan / angular-ngrx-material-starter

Angular, NgRx, Angular CLI & Angular Material Starter Project
https://tomastrajan.github.io/angular-ngrx-material-starter
MIT License
2.82k stars 918 forks source link

Not so much an issue as a request for better understanding... #434

Closed sreyemnayr closed 5 years ago

sreyemnayr commented 5 years ago

I'm trying to get the starter running as-is before modifying to work with my API, primarily Django Rest Framework. If I run it with ng serve, it works as expected. When I try to build it and run it from within Django, I get some strange behaviors... The examples page gives errors and doesn't really load fully. image I think this may have something to do the the NgRx states, but I don't feel confident knowing exactly what's going on. I'm still trying to wrap my brain around Angular (and TypeScript). Can anyone give me a little guidance here? My forked repo is here: https://github.com/sreyemnayr/angular-ngrx-material-starter Changes I made are in this commit: https://github.com/sreyemnayr/angular-ngrx-material-starter/commit/92f669e56215c29d7f2981f973642ab197e133e3

Like I said, it still works fine with ng serve, so I think I'm lacking some understanding about what happens when it's built.

Also, and this may or may not be related, when I run ng build with the --prod flag, a chunk has a null name and gets named 4.js, where without it it gets named app-examples-examples-module. Not sure if this is relevant or not...

sreyemnayr commented 5 years ago

Somehow I was able to get this functioning by removing the Google Analytics calls (it's blocked by my firewall anyway). It's very strange that this got it working, however.. Not entirely sure why.