11// make sure you import mocha-config before @angular/core
2- import { assert } from ' ./test-config' ;
3- import { Component , ComponentRef , Directive , TemplateRef , ViewContainerRef } from ' @angular/core' ;
4- import { View } from ' ui/core/view' ;
5- import { Label } from ' ui/label' ;
6- import { nTestBedAfterEach , nTestBedBeforeEach , nTestBedRender } from ' nativescript-angular/testing' ;
2+ import { assert } from " ./test-config" ;
3+ import { Component , ComponentRef , Directive , TemplateRef , ViewContainerRef } from " @angular/core" ;
4+ import { View } from " ui/core/view" ;
5+ import { Label } from " ui/label" ;
6+ import { nTestBedAfterEach , nTestBedBeforeEach , nTestBedRender } from " nativescript-angular/testing" ;
77// >> third-party-simple-view-registration
8- import { registerElement } from ' nativescript-angular/element-registry' ;
8+ import { registerElement } from " nativescript-angular/element-registry" ;
99registerElement ( "third-party-view" , ( ) => require ( "./third-party-view" ) . SimpleTag ) ;
1010// << third-party-simple-view-registration
1111
@@ -48,18 +48,18 @@ export class DocumentFormComponent {
4848} )
4949export class DocumentTitleDirective {
5050 public static titleLabel : Label ;
51-
5251 constructor (
5352 private ownerForm : DocumentFormComponent ,
5453 private viewContainer : ViewContainerRef ,
55- private template : TemplateRef < any > ) {
54+ private template : TemplateRef < any >
55+ ) {
5656 }
5757
5858 ngOnInit ( ) {
5959 const viewRef = this . viewContainer . createEmbeddedView ( this . template ) ;
6060 // filter out whitespace nodes
6161 const titleViews = viewRef . rootNodes . filter ( ( node ) =>
62- node && node . nodeName !== "#text" ) ;
62+ node && node . nodeName !== "#text" ) ;
6363
6464 if ( titleViews . length > 0 ) {
6565 const titleView = titleViews [ 0 ] ;
@@ -73,9 +73,9 @@ export class DocumentTitleDirective {
7373@Component ( {
7474 selector : "document-form-container" ,
7575 template : `
76- <document-form src="document1.pdf">
77- <Label *documentTitle text="Document1"></Label>
78- </document-form>
76+ <document-form src="document1.pdf">
77+ <Label *documentTitle text="Document1"></Label>
78+ </document-form>
7979 `
8080} )
8181export class DocumentFormContainer {
0 commit comments