In my angular2 project I\'m trying to extend the prototype of the string class using typescript. This is my code:
interface String { startsWith(s:
Instead of importing the code in html just put this at the top of your code:
import './utils/extensions';
Just replace it with your path to the file.
Here are some more resources on modules and imports:
TypeScript docs
MDN docs