Angular2 How to get APP_BASE_HREF programmatically?

How to get APP_BASE_HREF programmatically? I have this in my app.module.ts (where APP_BASE='/'): { provide: APP_BASE_HREF, useValue: '<%= APP_BASE %>' }, I'm trying: import {