liberry
Version:
liberry is a command utility to help you easily set up, develop, and host your own project pattern library.
11 lines (9 loc) • 372 B
text/typescript
import {PLATFORM_DIRECTIVES, provide} from '@angular/core';
export default function globalizeDirectives(directives) {
var PlatformDirectives = [];
for (var i in directives) {
var directive = directives[i];
PlatformDirectives.push(provide(PLATFORM_DIRECTIVES, {useValue: directive, multi: true}));
}
return PlatformDirectives;
}