I have a RadSideDrawer and I want to apply a directive to a Control that is in the MainContent of the RadSideDrawer. Here is my Component using a RadSideDrawer.
<RadSideDrawer>
<StackLayout tkDrawerContent class="sideStackLayout">
<StackLayout class="sideTitleStackLayout" backgroundGradient [gradientColors]="['red','blue']">
<Image horizontalAlignment="center" class="avatar" src="res://avatar"></Image>
<Label horizontalAlignment="center" class="name" text="Zeeko"></Label>
<Label horizontalAlignment="center" class="email" text="1519560753@qq.com"></Label>
</StackLayout>
<StackLayout>
<StackLayout orientation="horizontal">
<Label [text]="'fa-file-text' | fonticon" class="fa icon"></Label>
<Label class="side-item-lbl" text="我的简历"></Label>
</StackLayout>
<Label class="side-item-lbl" col="2" row="2" text="已投递"></Label>
</StackLayout>
</StackLayout>
<StackLayout tkMainContent>
<Button text="OPEN DRAWER" (tap)=openDrawer()></Button>
<Label text="欢迎来到主页" textWrap="true"></Label>
</StackLayout>
And here is my directive. Directive
Then I got unexpected ElementRef in the Directive's ngOnInit method, whoes nativeElement
property is undefined.
If you can help me, I'll be very grateful.