1

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.

1
  • 1
    ng-bootstrap's package.json shows that it requires Angular 4.0.3. Commented Jun 22, 2017 at 17:37

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the reply. The issue is fixed with your help
Not working for me with angular version 2.4.7. I even tried with 1.0.0-alpha.0, no luck.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.