These are chat archives for AngularClass/angular2-webpack-starter

21st
Mar 2017
Forrest Murray
@FMurray
Mar 21 2017 02:58
how to I get more descriptive stack traces? It seems like the dll is obscuring a lot
EXCEPTION: Uncaught (in promise): Error: Error in ./ProductComponent class ProductComponent - inline template:62:13 caused by: Cannot read property '0' of undefined
Error: Error in ./ProductComponent class ProductComponent - inline template:62:13 caused by: Cannot read property '0' of undefined
    at ViewWrappedError.ZoneAwareError (http://localhost:3000/polyfills.dll.js:4731:33)
    at ViewWrappedError.BaseError [as constructor] (http://localhost:3000/vendor.dll.js:28595:16)
    at ViewWrappedError.WrappedError [as constructor] (http://localhost:3000/vendor.dll.js:28660:16)
    at new ViewWrappedError (http://localhost:3000/vendor.dll.js:58640:16)
    at CompiledTemplate.proxyViewClass.DebugAppView._rethrowWithContext (http://localhost:3000/vendor.dll.js:80035:23)
    at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (http://localhost:3000/vendor.dll.js:80008:18)
    at CompiledTemplate.proxyViewClass.AppView.internalDetectChanges (http://localhost:3000/vendor.dll.js:79795:18)
    at CompiledTemplate.proxyViewClass.View_ProductComponent_Host0.detectChangesInternal (/AppModule/ProductComponent/host.ngfactory.js:29:19)
    at CompiledTemplate.proxyViewClass.AppView.detectChanges (http://localhost:3000/vendor.dll.js:79810:14)
    at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (http://localhost:3000/vendor.dll.js:80005:44)
    at ViewRef_.detectChanges (http://localhost:3000/vendor.dll.js:59572:20)
    at RouterOutlet.activate (http://localhost:3000/vendor.dll.js:65112:42)
    at ActivateRoutes.placeComponentIntoOutlet (http://localhost:3000/vendor.dll.js:23665:16)
    at ActivateRoutes.activateRoutes (http://localhost:3000/vendor.dll.js:23632:26)
    at http://localhost:3000/vendor.dll.js:23568:58
    at Array.forEach (native)
    at ActivateRoutes.activateChildRoutes (http://localhost:3000/vendor.dll.js:23568:29)
    at ActivateRoutes.activate (http://localhost:3000/vendor.dll.js:23542:14)
    at http://localhost:3000/vendor.dll.js:23110:22
    at SafeSubscriber._next (http://localhost:3000/vendor.dll.js:171:21)
    at SafeSubscriber.__tryOrSetError (http://localhost:3000/vendor.dll.js:600:16)
    at SafeSubscriber.next (http://localhost:3000/vendor.dll.js:542:27)
    at Subscriber._next (http://localhost:3000/vendor.dll.js:493:26)
    at Subscriber.next (http://localhost:3000/vendor.dll.js:457:18)
YUCK
hitoz
@hitoz
Mar 21 2017 04:21
Hello there
hitoz
@hitoz
Mar 21 2017 04:26

i am using angular in memory web api package on my project that build based on angular2 webpack starter,

i am using lazy loading for each submodules, i realized that every submodule will be loaded when the app is navigating somewhere..
the problem is, i import my angular in memory web api inside the submodule, to use the mockup API..
after i saved the data on mockup API, its working.. but when i navigate to somewhere else, the data will be reset (I think this is because we reload submodule again)..

For example:
I am going to update User, i am doing PUT 'api/users/5';
if i am not redirect to anywhere, the data will be keep..

but when i am going to navigate to list of user GET 'api/users';
the data will be reset because the module will be reload again..

FYI, update user form and list of user view is in a same module, why it load twice ? should be once right ?

roded
@roded
Mar 21 2017 17:35
Hello, I'm wondering what's the best practice for the following scenario: I'd like to use the zxcvbn library in my ng2-webpack-starter app. (zxcvbn is a password-strengh js library distributed via npm, there's also the TypeScript def file for it on github somewhere). Thing is, as the library is several 00s kbytes in size and should be used from a minimal set of pages in the application, I'd like to load it dynamically and not bundle it with the whole app via webpack. Is there a recommended method of accomplishing this? Much obliged & thanks