angular - Using @ngrx/store and @ngrx/core with System.js module loader -
in order use @ngrx/store [ 2.2.1 ] , @ngrx/core [ 1.2.0 ] state management in sample angular 2 [2.4.0] application followed below steps
- installed @ngrx/store [ 2.2.1 ] , @ngrx/core
added below import root module
import { storemodule } '@ngrx/store';
3 added below code in packages section of systemjs.config.js file
'@ngrx/core': { main: 'bundles/core.umd.js', format: 'cjs' }, '@ngrx/store': { main: 'bundles/store.umd.js', format: 'cjs' }
i getting below error in browser console , when browse website
failed load resource: server responded status of 404 (not found) "http://localhost:62818/@ngrx/store/bundles/store.umd.js"
any idea needs modified fix issue.
as @ estus mentioned , path issue . adding below lines map section correct path resolved issue
'@ngrx/core': 'node_modules/@ngrx/core/bundles/core.umd.js', '@ngrx/store': 'node_modules/@ngrx/store/bundles/store.umd.js',
Comments
Post a Comment