Currently experimenting with Angular2, but I find myself in need of using jQuery.
After downloading the d.ts file, I referenced the definitions in each file using the following syntax:
/// <reference path="../../../../typings/jquery/jquery.d.ts" />
This method works, but it raises two questions:
- Is it necessary to use this syntax in every file? (not very convenient)
- Is this the correct syntax to use? In Angular2 (typescript), we typically use something like:
So, what are the differences and which approach is better?import {RouteConfig, RouterOutlet} from 'angular2/router';