{"action":"created","issue":{"url":"https://api.github.com/repos/valor-software/ngx-bootstrap/issues/4432","repository_url":"https://api.github.com/repos/valor-software/ngx-bootstrap","labels_url":"https://api.github.com/repos/valor-software/ngx-bootstrap/issues/4432/labels{/name}","comments_url":"https://api.github.com/repos/valor-software/ngx-bootstrap/issues/4432/comments","events_url":"https://api.github.com/repos/valor-software/ngx-bootstrap/issues/4432/events","html_url":"https://github.com/valor-software/ngx-bootstrap/issues/4432","id":332481373,"node_id":"MDU6SXNzdWUzMzI0ODEzNzM=","number":4432,"title":" StaticInjectorError(Platform: core)[BsModalService -> ComponentLoaderFactory]:","user":{"login":"buddyackerman","id":8039125,"node_id":"MDQ6VXNlcjgwMzkxMjU=","avatar_url":"https://avatars3.githubusercontent.com/u/8039125?v=4","gravatar_id":"","url":"https://api.github.com/users/buddyackerman","html_url":"https://github.com/buddyackerman","followers_url":"https://api.github.com/users/buddyackerman/followers","following_url":"https://api.github.com/users/buddyackerman/following{/other_user}","gists_url":"https://api.github.com/users/buddyackerman/gists{/gist_id}","starred_url":"https://api.github.com/users/buddyackerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buddyackerman/subscriptions","organizations_url":"https://api.github.com/users/buddyackerman/orgs","repos_url":"https://api.github.com/users/buddyackerman/repos","events_url":"https://api.github.com/users/buddyackerman/events{/privacy}","received_events_url":"https://api.github.com/users/buddyackerman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-14T16:44:10Z","updated_at":"2018-06-14T18:10:15Z","closed_at":"2018-06-14T18:10:15Z","author_association":"NONE","body":"### Bug description or feature request:\r\nI get this error in my unit tests for a directive that uses the BsModalService.  Here's the error being thrown in the unit test (using Jasmine):\r\n\r\n    StaticInjectorError(Platform: core)[BsModalService -> ComponentLoaderFactory]:\r\n    NullInjectorError: No provider for ComponentLoaderFactory!\r\n    Error: StaticInjectorError(DynamicTestModule)[BsModalService -> ComponentLoaderFactory]:\r\n\r\n\r\nMy testbed setup:\r\n\r\n\r\n    beforeEach(async(() => {\r\n        TestBed.configureTestingModule({\r\n          providers: [\r\n            BsModalService,\r\n            BsModalRef,\r\n            Title,\r\n            { provide: SessionKeepAliveService, useClass: SessionKeepAliveStubService },\r\n            { provide: ApplicationStateService, useClass: ApplicationStateStubService },\r\n            { provide: DocumentService, useClass: MockDocumentService }\r\n          ],\r\n          imports: []\r\n        });\r\n    }));\r\n\r\n\r\nMy unit test:\r\n\r\n    it('should set sessionTimeOutLength to the value from the KeepALiveService',\r\n        async(inject([ApplicationStateService, SessionKeepAliveService, BsModalService, Title, DocumentService],\r\n        (appStateService: ApplicationStateService, keepAliveService: SessionKeepAliveService, modalService: BsModalService, titleService: Title, documentService: DocumentService) \r\n        => {\r\n          const directive = new SessionTimeoutDirective(appStateService, keepAliveService, modalService, titleService, documentService);\r\n          keepAliveService.keepSessionAlive().subscribe(t => {\r\n            expect(directive.sessionTimeoutLength).toEqual(t.sessionTimeout);\r\n          });\r\n    })));\r\n\r\n\r\n### Versions of ngx-bootstrap, Angular, and Bootstrap:\r\n\r\nngx-bootstrap: 2.0.5\r\n\r\nAngular: 5.2.6\r\n\r\nBootstrap: 3.x\r\n\r\n### Build system: Angular CLI, System.js, webpack, starter seed:\r\nAngular Cli: v1.6.8\r\nwebpack: v3.10, \r\njasmine: v2.8\r\n"},"comment":{"url":"https://api.github.com/repos/valor-software/ngx-bootstrap/issues/comments/397388161","html_url":"https://github.com/valor-software/ngx-bootstrap/issues/4432#issuecomment-397388161","issue_url":"https://api.github.com/repos/valor-software/ngx-bootstrap/issues/4432","id":397388161,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzM4ODE2MQ==","user":{"login":"buddyackerman","id":8039125,"node_id":"MDQ6VXNlcjgwMzkxMjU=","avatar_url":"https://avatars3.githubusercontent.com/u/8039125?v=4","gravatar_id":"","url":"https://api.github.com/users/buddyackerman","html_url":"https://github.com/buddyackerman","followers_url":"https://api.github.com/users/buddyackerman/followers","following_url":"https://api.github.com/users/buddyackerman/following{/other_user}","gists_url":"https://api.github.com/users/buddyackerman/gists{/gist_id}","starred_url":"https://api.github.com/users/buddyackerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buddyackerman/subscriptions","organizations_url":"https://api.github.com/users/buddyackerman/orgs","repos_url":"https://api.github.com/users/buddyackerman/repos","events_url":"https://api.github.com/users/buddyackerman/events{/privacy}","received_events_url":"https://api.github.com/users/buddyackerman/received_events","type":"User","site_admin":false},"created_at":"2018-06-14T18:10:15Z","updated_at":"2018-06-14T18:10:15Z","author_association":"NONE","body":"Found that the testbed setup needed needed an import for ModalModule.forRoot()\r\n\r\n    beforeEach(async(() => {\r\n        TestBed.configureTestingModule({\r\n          providers: [\r\n            BsModalService,\r\n            BsModalRef,\r\n            Title,\r\n            { provide: SessionKeepAliveService, useClass: SessionKeepAliveStubService },\r\n            { provide: ApplicationStateService, useClass: ApplicationStateStubService },\r\n            { provide: DocumentService, useClass: MockDocumentService }\r\n          ],\r\n          imports: [ModalModule.forRoot()]\r\n        });\r\n    }));"}}
{"actor":{"display_login":"buddyackerman"}}