File tree Expand file tree Collapse file tree 1 file changed +22
-28
lines changed
projects/angular/directives/src/ui-ng-let Expand file tree Collapse file tree 1 file changed +22
-28
lines changed Original file line number Diff line number Diff line change 1
1
import {
2
- Directive ,
3
- Input ,
4
- OnInit ,
5
- TemplateRef ,
6
- ViewContainerRef ,
2
+ Directive ,
3
+ Input ,
4
+ TemplateRef ,
5
+ ViewContainerRef ,
7
6
} from '@angular/core' ;
8
7
9
8
/**
@@ -26,33 +25,28 @@ class NgLetContext {
26
25
// tslint:disable-next-line: directive-selector
27
26
selector : '[ngLet]' ,
28
27
} )
29
- export class UiNgLetDirective implements OnInit {
28
+ export class UiNgLetDirective {
30
29
private _context = new NgLetContext ( ) ;
31
30
32
- /**
33
- * The context bound to the decorated area.
34
- *
35
- */
36
- @Input ( )
31
+ /**
32
+ * The context bound to the decorated area.
33
+ *
34
+ */
35
+ @Input ( )
37
36
set ngLet ( value : any ) {
38
37
this . _context . $implicit = this . _context . ngLet = value ;
39
38
}
40
39
41
- /**
42
- * @ignore
43
- */
44
- constructor (
45
- private _vcr : ViewContainerRef ,
46
- private _templateRef : TemplateRef < NgLetContext > ,
47
- ) { }
48
-
49
- /**
50
- * @ignore
51
- */
52
- ngOnInit ( ) {
53
- this . _vcr . createEmbeddedView (
54
- this . _templateRef ,
55
- this . _context ,
56
- ) ;
57
- }
40
+ /**
41
+ * @ignore
42
+ */
43
+ constructor (
44
+ private _vcr : ViewContainerRef ,
45
+ private _templateRef : TemplateRef < NgLetContext > ,
46
+ ) {
47
+ this . _vcr . createEmbeddedView (
48
+ this . _templateRef ,
49
+ this . _context ,
50
+ ) ;
51
+ }
58
52
}
You can’t perform that action at this time.
0 commit comments