Miran Parkar
Miran Parkar

Reputation: 1583

Getting error white using ngx-bootstrap-modal in production mode angular 2

Cannot resolve all parameters for 'l'(?). Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'l' is decorated with Injectable. Below is my code

import { Component, OnInit } from '@angular/core';
import { ItemModalComponent } from './item-modal/item-modal.component';
import { BsModalRef } from 'ngx-bootstrap/modal/modal-options.class';
import { BsModalService } from 'ngx-bootstrap/modal/bs-modal.service';


@Component({
selector: 'app-items',
templateUrl: 'items.component.html',
styleUrls: ['./items.component.scss']
})

export class ItemsComponent implements OnInit {


bsModalRef: BsModalRef;
constructor(private modalService: BsModalService) {}



openItemModal() {
    this.bsModalRef = this.modalService.show(ItemModalComponent, {class: 
    'modal-lg'});
    console.log(this.bsModalRef);
    this.bsModalRef.content.title = 'New Item';
  }

ngOnInit() { }
}

Upvotes: 0

Views: 215

Answers (1)

sachin
sachin

Reputation: 250

Which angular version you are using? Delete existing node module and install new one. Might be this will help you

Upvotes: 0

Related Questions