user2038804
user2038804

Reputation: 11

angular 2 - ng-bootstrap compatibility

I need to install and use ng-bootstrap in my angular 2 project.I am getting the following after compiling the project. ERROR in [at-loader] ./node_modules/@ng-bootstrap/ng-bootstrap/buttons/radio.d.ts:1:10 TS2305: Module '"/Users/ddavidxavierlourdu/Desktop/angular4/ui-superadmin/node_modules/@angular/core/index"' has no exported member 'Renderer2'.

Is there any solution to use ng-bootstrap in angular 2 or should I upgrade my angular to 4?

Thanks in advance.

Upvotes: 1

Views: 649

Answers (1)

CharanRoot
CharanRoot

Reputation: 6325

Renderer2 was introduced in the Angular 4 and latest bootstrap using Renderer2 so you need change use to older bootstrap

you can change version in package.json file

"@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.16",

1.0.0-alpha.16 will work with angular 2

after than do npm install to install older version.

if you want latest bootstrap than you need use latest angular.

Upvotes: 4

Related Questions