dnet45/modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/shared/reusablecomponents/forms/my-form.directive.ts @ 58412
1 |
/**
|
---|---|
2 |
* Created by stefanos on 15/5/2017.
|
3 |
*/
|
4 |
import { AfterViewInit, Directive, TemplateRef, ViewContainerRef } from '@angular/core'; |
5 |
|
6 |
@Directive({ |
7 |
selector: '[my-form]', |
8 |
})
|
9 |
export class MyFormDirective implements AfterViewInit { |
10 |
|
11 |
constructor(public viewContainerRef: ViewContainerRef, public templateRef: TemplateRef<any>) {} |
12 |
|
13 |
ngAfterViewInit(): void { |
14 |
this.viewContainerRef.createEmbeddedView(this.templateRef); |
15 |
}
|
16 |
}
|