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.
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:
See this question for more details: