Q:

Angular2 DI javascript library

How i can Inject any javascript library into component.
For instance i want to use Materialize framework in my angular2 app written in typescript. 

This approach throws an error.

A:

In fact, there are two parts:

For compilation. You need to install the corresponding typings or make it available within your dependencies (node_modules). The files with extensions .d.ts
For runtime. You need to configure the dependency in the module manager. For example SystemJS.
See this question for example: 

integrating issue of ng2-material with Angular2.

See this question for more details:

Angular2 Cannot find module 'angular2/core' but application works

