components: ERROR Error: No provider for e!

Bug, feature request, or proposal:

Bug

What is the expected behavior?

The expected behavor is to show the modal

What is the current behavior?

when i click the button a modal should PopUp and i get this error

ERROR Error: No provider for e!
    at C (vendor.e889734c5a40aee1e88f.bundle.js:1)
    at O (vendor.e889734c5a40aee1e88f.bundle.js:1)
    at t._throwOrNull (vendor.e889734c5a40aee1e88f.bundle.js:1)
    at t._getByKeyDefault (vendor.e889734c5a40aee1e88f.bundle.js:1)
    at t._getByKey (vendor.e889734c5a40aee1e88f.bundle.js:1)
    at t.get (vendor.e889734c5a40aee1e88f.bundle.js:1)
    at Ne (vendor.e889734c5a40aee1e88f.bundle.js:1)
    at t.get (vendor.e889734c5a40aee1e88f.bundle.js:1)
    at gn (vendor.e889734c5a40aee1e88f.bundle.js:1)
    at fn (vendor.e889734c5a40aee1e88f.bundle.js:1)
v @ vendor.e889734c5a40aee1e88f.bundle.js:1

But When run ng serve all is ok the md-dialoge is works , But if i run the app in --prod mode i have this error, I dont know what to Do??

What are the steps to reproduce?

Providing a Plunker (or similar) is the best way to get the team to see your issue. Plunker template: https://goo.gl/DlHd6U

i have a button that opens the dialoge

dialoge.component.html

<div>
  <form [formGroup]="registerPharmacy" novalidate (ngSubmit)="dialogRef.close(registerPharmacy.value)" ngNativeValidate>
    <div fxLayout="column" fxLayoutGap="10px" fxLayoutAlign="center center" style="padding-top:10px;">
      
      <div fxFlex="10px"></div>
      <div fxFlex="20px" style="font-weight: 300;font-size: 20px;color: blueviolet;">
        Πρόσεχε που στέλνεις τα email.
      </div>
      <div fxFlex="10px"></div>

      <md-input-container style="width:100%;">
        <input mdInput type="email" ngModel pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$" 
        maxlength="50" formControlName="email"  name="email" placeholder="Email" required>

        <md-hint *ngIf="registerPharmacy.get('email').touched" >
          <span class="error_hint" *ngIf="registerPharmacy.get('email').hasError('pattern')">
              *Το email δεν είναι έγκυρο.
          </span>
        </md-hint>

      </md-input-container>

      <md-input-container fxFlex="100" style="width:100%;">
        <input mdInput fxFlex="100" type="password" ngModel minlength="8" maxlength="30" name="password"
          pattern="" formControlName="password"
          placeholder="Password" required style="width:100%;"
        >
        <md-hint *ngIf="registerPharmacy.get('password').touched" >
          <span class="error_hint" *ngIf="registerPharmacy.get('password').hasError('minlength')">
              *Ο κωδικός είναι πολλή μικρός, τουλάχιστον 8 ψηφία.
          </span>
        </md-hint>
      </md-input-container>

      <md-input-container fxFlex="100" style="width:100%;">
        <input mdInput fxFlex="100" type="password" ngModel minlength="8" maxlength="30" name="password_again"
          pattern="" formControlName="password_again"
          placeholder="Password again" required style="width:100%;">
        <md-hint *ngIf="registerPharmacy.get('password_again').touched" >
          <span class="error_hint" *ngIf="registerPharmacy.get('password_again').hasError('minlength')">
              *Ο κωδικός είναι πολλή μικρός, τουλάχιστον 8 ψηφία.
          </span>
        </md-hint>
      </md-input-container>

      <div fxLayout="row" fxLayoutGap="10px" fxLayoutAlign="center center" style="padding:0px; min-width: 100%;">
        <md-input-container style="width:100%;">
          <input mdInput  type="text" ngModel minlength="4" maxlength="30" formControlName="first_name" name="first_name" 
          placeholder="Όνομα" required>

          <md-hint *ngIf="registerPharmacy.get('first_name').touched" >
            <span class="error_hint" *ngIf="registerPharmacy.get('first_name').hasError('minlength')">
                *Το όνομα δέν είναι έγκυρο.
            </span>
          </md-hint>
        </md-input-container>

        <md-input-container style="width:100%;">
          <input mdInput type="text" ngModel minlength="5" maxlength="30" formControlName="last_name" name="last_name" 
          placeholder="Επώνυμο" required>

          <md-hint *ngIf="registerPharmacy.get('last_name').touched" >
            <span class="error_hint" *ngIf="registerPharmacy.get('last_name').hasError('minlength')">
                *Το Επώνυμο δέν είναι έγκυρο.
            </span>
          </md-hint>

        </md-input-container>
      </div>

      <md-input-container style="width:100%;">
        <input mdInput type="text" ngModel pattern="[0-9]{10}" maxlength="10" name="phone"
          placeholder="Τηλεφωνο επικοινωνίας" formControlName="phone" required>
      </md-input-container>
      

      <button [disabled]="registerPharmacy.invalid || !registerPharmacy.dirty" md-raised-button color="primary" style="width: 100%;">Γίνε μέλος</button>

      <div fxFlex="" style="font-size: 12px;">
        Δημιουργώντας λογαριασμό αποδέχεσαι τους <a routerLink="/"> όρους χρήσης</a>.
      </div>

      <div fxFlex="" style="font-size: 15px;">
        <a href="">Εχεις λογαριασμό συνδέσου? </a>
      </div>

    </div>
  </form>

</div>
  

app.module.ts

// Login and register pharmacists
import { DialLoginPharmacistComponent } from './Partials/dial-login-pharmacist/dial-login-pharmacist.component';
import { DialRegisterPharmacistComponent } from './Partials/dial-register-pharmacist/dial-register-pharmacist.component';


 providers: [
    HttpModule,
    MediatorService,
    ApiService,
    ApiAgentsService,
    ApiPharmacistsService,
    AuthService,
    ClientService,
    FirebaseService,
    AngularFireAuth,
    AngularFireDatabase,
    CustomSnackbarComponent
],
entryComponents: [
    DialLoginPharmacistComponent ,
    DialRegisterPharmacistComponent ,
],

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

"dependencies": {
    "@angular/animations": "^4.4.2",
    "@angular/cdk": "^2.0.0-beta.10",
    "@angular/common": "^4.4.2",
    "@angular/compiler": "^4.4.2",
    "@angular/core": "^4.4.2",
    "@angular/flex-layout": "^2.0.0-rc.1",
    "@angular/forms": "^4.4.2",
    "@angular/http": "^4.4.2",
    "@angular/material": "^2.0.0-beta.10",
    "@angular/platform-browser": "^4.4.2",
    "@angular/platform-browser-dynamic": "^4.4.2",
    "@angular/router": "^4.4.2",
    "angularfire2": "^4.0.0-rc0",
    "core-js": "^2.5.1",
    "firebase": "^4.3.1",
    "hammerjs": "^2.0.8",
    "rxjs": "^5.4.2",
    "zone.js": "^0.8.17"
  },
  "devDependencies": {
    "@angular/cli": "1.3.0",
    "@angular/compiler-cli": "^4.4.2",
    "@angular/language-service": "^4.4.2",
    "@types/jasmine": "^2.5.54",
    "@types/jasminewd2": "^2.0.3",
    "@types/node": "^6.0.88",
    "codelyzer": "~3.1.1",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "^1.7.1",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.3.2",
    "typescript": "~2.3.3"
  }

Is there anything else we should know?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 32 (1 by maintainers)

Most upvoted comments

I have fixed this error and yes 4.4.3 in the angular version.