0
私はウェブサイトをangular2からangular4に変更しました。それはng-templateでなければならないが、ng-bootstrapで動作し、templateタグをng-templateに変更したときに動作を停止した。Angular4ウェブサイトが動作しません
しかし、うまくいけば、私はビルドしなかったし、エラーもなく完全にビルドしました。しかし、まだそれは私のウェブサイトはもう表示されません。また、私はこのエラーを取得:
Uncaught InvalidProviderError {_nativeError: Error: Invalid provider - only instances of Provider and Type are allowed, got: undefined
at Inv…}message: (...)name: (...)stack: (...)_nativeError: Error: Invalid provider - only instances of Provider and Type are allowed, got: undefined
at InvalidProviderError.BaseError [as constructor] (http://beterfysiek.nl/vendor.bundle.js:7029:27) [<root>]
at new InvalidProviderError (http://beterfysiek.nl/vendor.bundle.js:59093:16) [<root>]
at http://beterfysiek.nl/vendor.bundle.js:42468:19 [<root>]
at Array.forEach (native) [<root>]
at _normalizeProviders (http://beterfysiek.nl/vendor.bundle.js:42457:15) [<root>]
at http://beterfysiek.nl/vendor.bundle.js:42465:13 [<root>]
at Array.forEach (native) [<root>]
at _normalizeProviders (http://beterfysiek.nl/vendor.bundle.js:42457:15) [<root>]
at resolveReflectiveProviders (http://beterfysiek.nl/vendor.bundle.js:42408:39) [<root>]
at Function.ReflectiveInjector.resolve (http://beterfysiek.nl/vendor.bundle.js:82535:127) [<root>]
at Function.ReflectiveInjector.resolveAndCreate (http://beterfysiek.nl/vendor.bundle.js:82566:79) [<root>]
at JitCompilerFactory.createCompiler (http://beterfysiek.nl/vendor.bundle.js:76275:107) [<root>]
at PlatformRef_._bootstrapModuleWithZone (http://beterfysiek.nl/vendor.bundle.js:40647:57) [<root>]
at PlatformRef_.bootstrapModule (http://beterfysiek.nl/vendor.bundle.js:40634:21) [<root>]originalStack: "Error: Invalid provider - only instances of Provider and Type are allowed, got: undefined↵ at ZoneAwareError (http://beterfysiek.nl/vendor.bundle.js:107261:33)↵ at InvalidProviderError.BaseError [as constructor] (http://beterfysiek.nl/vendor.bundle.js:7029:27)↵ at new InvalidProviderError (http://beterfysiek.nl/vendor.bundle.js:59093:16)↵ at http://beterfysiek.nl/vendor.bundle.js:42468:19↵ at Array.forEach (native)↵ at _normalizeProviders (http://beterfysiek.nl/vendor.bundle.js:42457:15)↵ at http://beterfysiek.nl/vendor.bundle.js:42465:13↵ at Array.forEach (native)↵ at _normalizeProviders (http://beterfysiek.nl/vendor.bundle.js:42457:15)↵ at resolveReflectiveProviders (http://beterfysiek.nl/vendor.bundle.js:42408:39)↵ at Function.ReflectiveInjector.resolve (http://beterfysiek.nl/vendor.bundle.js:82535:127)↵ at Function.ReflectiveInjector.resolveAndCreate (http://beterfysiek.nl/vendor.bundle.js:82566:79)↵ at JitCompilerFactory.createCompiler (http://beterfysiek.nl/vendor.bundle.js:76275:107)↵ at PlatformRef_._bootstrapModuleWithZone (http://beterfysiek.nl/vendor.bundle.js:40647:57)↵ at PlatformRef_.bootstrapModule (http://beterfysiek.nl/vendor.bundle.js:40634:21)"zoneAwareStack: "Error: Invalid provider - only instances of Provider and Type are allowed, got: undefined↵ at InvalidProviderError.BaseError [as constructor] (http://beterfysiek.nl/vendor.bundle.js:7029:27) [<root>]↵ at new InvalidProviderError (http://beterfysiek.nl/vendor.bundle.js:59093:16) [<root>]↵ at http://beterfysiek.nl/vendor.bundle.js:42468:19 [<root>]↵ at Array.forEach (native) [<root>]↵ at _normalizeProviders (http://beterfysiek.nl/vendor.bundle.js:42457:15) [<root>]↵ at http://beterfysiek.nl/vendor.bundle.js:42465:13 [<root>]↵ at Array.forEach (native) [<root>]↵ at _normalizeProviders (http://beterfysiek.nl/vendor.bundle.js:42457:15) [<root>]↵ at resolveReflectiveProviders (http://beterfysiek.nl/vendor.bundle.js:42408:39) [<root>]↵ at Function.ReflectiveInjector.resolve (http://beterfysiek.nl/vendor.bundle.js:82535:127) [<root>]↵ at Function.ReflectiveInjector.resolveAndCreate (http://beterfysiek.nl/vendor.bundle.js:82566:79) [<root>]↵ at JitCompilerFactory.createCompiler (http://beterfysiek.nl/vendor.bundle.js:76275:107) [<root>]↵ at PlatformRef_._bootstrapModuleWithZone (http://beterfysiek.nl/vendor.bundle.js:40647:57) [<root>]↵ at PlatformRef_.bootstrapModule (http://beterfysiek.nl/vendor.bundle.js:40634:21) [<root>]"message: "Invalid provider - only instances of Provider and Type are allowed, got: undefined"stack: "Error: Invalid provider - only instances of Provider and Type are allowed, got: undefined↵ at InvalidProviderError.BaseError [as constructor] (http://beterfysiek.nl/vendor.bundle.js:7029:27) [<root>]↵ at new InvalidProviderError (http://beterfysiek.nl/vendor.bundle.js:59093:16) [<root>]↵ at http://beterfysiek.nl/vendor.bundle.js:42468:19 [<root>]↵ at Array.forEach (native) [<root>]↵ at _normalizeProviders (http://beterfysiek.nl/vendor.bundle.js:42457:15) [<root>]↵ at http://beterfysiek.nl/vendor.bundle.js:42465:13 [<root>]↵ at Array.forEach (native) [<root>]↵ at _normalizeProviders (http://beterfysiek.nl/vendor.bundle.js:42457:15) [<root>]↵ at resolveReflectiveProviders (http://beterfysiek.nl/vendor.bundle.js:42408:39) [<root>]↵ at Function.ReflectiveInjector.resolve (http://beterfysiek.nl/vendor.bundle.js:82535:127) [<root>]↵ at Function.ReflectiveInjector.resolveAndCreate (http://beterfysiek.nl/vendor.bundle.js:82566:79) [<root>]↵ at JitCompilerFactory.createCompiler (http://beterfysiek.nl/vendor.bundle.js:76275:107) [<root>]↵ at PlatformRef_._bootstrapModuleWithZone (http://beterfysiek.nl/vendor.bundle.js:40647:57) [<root>]↵ at PlatformRef_.bootstrapModule (http://beterfysiek.nl/vendor.bundle.js:40634:21) [<root>]"__proto__: Object__proto__: BaseError
(anonymous) @ vendor.bundle.js:42468
_normalizeProviders @ vendor.bundle.js:42457
(anonymous) @ vendor.bundle.js:42465
_normalizeProviders @ vendor.bundle.js:42457
resolveReflectiveProviders @ vendor.bundle.js:42408
ReflectiveInjector.resolve @ vendor.bundle.js:82535
ReflectiveInjector.resolveAndCreate @ vendor.bundle.js:82566
JitCompilerFactory.createCompiler @ vendor.bundle.js:76275
PlatformRef_._bootstrapModuleWithZone @ vendor.bundle.js:40647
PlatformRef_.bootstrapModule @ vendor.bundle.js:40634
516 @ main.bundle.js:2053
__webpack_require__ @ inline.bundle.js:53
1118 @ main.bundle.js:6
__webpack_require__ @ inline.bundle.js:53
webpackJsonpCallback @ inline.bundle.js:24
(anonymous) @ main.bundle.js:1
マイapp.module
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { routing } from "./app.routing";
import { HashLocationStrategy, LocationStrategy } from '@angular/common';
import { IntakeFormulierModule } from './intake-formulier/intake-formulier.module';
import { HomeModule } from './home/home.module';
import { AngularFireModule, AuthProviders, AuthMethods } from 'angularfire2';
import { firebaseConfig } from '../environments/firebase.config';
import { CookiesComponent } from './cookies/cookies.component';
const myFirebaseAuthConfig = {
provider: AuthProviders.Password,
method: AuthMethods.Password
};
@NgModule({
declarations: [
AppComponent,
CookiesComponent,
],
imports: [
routing,
HomeModule,
IntakeFormulierModule,
AngularFireModule.initializeApp(firebaseConfig, myFirebaseAuthConfig),
BrowserModule
],
providers: [{provide: LocationStrategy, useClass: HashLocationStrategy}],
bootstrap: [AppComponent]
})
export class AppModule { }
plunkrを作成できますか? –
のエラーでは分かりません。[こちら](https://github.com/angular/angular/issues/10714)のリンク –
もチェックしてください。あなたのapp.moduleを表示できますか? – brijmcq