2016-07-25 18 views
1

die Fehler in der Chromkonsole angezeigt:Die verringern Funktion verursacht Fehler

1. http://localhost:3000/vendor/@ngrx/store/index.js 
Failed to load resource: the server responded with a status of 404 (Not Found) 

2. localhost/:19 Error: Error: XHR error (404 Not Found) 
loading http://localhost:3000/vendor/@ngrx/store/index.js(…) 
(anonymous function) @ localhost/:19 

reducer.ts: * Ich kann nicht die aproppiate Typen für something1 Rückgabewert der Typ und Zustand Typ finden.

import { Action} from '@ngrx/store'; 
export const something1 = (state: any = {}, action:Action) => { 
    switch (action.type) { 
    default: 
     return state; 
    } 
}; 

main.ts: entfernen "provideStore ({something1})" wird die App Arbeit

import { bootstrap } from '@angular/platform-browser-dynamic'; 
import { AppComponent } from './app.component'; 
import { disableDeprecatedForms, provideForms } from '@angular/forms'; 
import {AccountService} from "./account.service"; 
import {provideStore} from '@ngrx/store'; 
import {something1} from "./reducer"; 

bootstrap(AppComponent, [ 
    AccountService, 
    disableDeprecatedForms(), 
    provideForms(), 
    provideStore({something1}) 
]) 
    .catch((err: any) => console.error(err)); 

Antwort

0

Gelöst führen!

Ich habe in systemjs.config.js innerhalb der Karte den Wert von '@ngrx' von Kreditor/@ ngrx zu 'node_modules/@ ngrx' geändert.