2016-12-15 241 views
0

nativescript应用中成功部署了设备,但同时点击登录按钮,它重定向到我的登录页面,但什么事也不会显示 我有什么是:nativescript UI页面无法正常工作

login.component.ts

@Component({ 
moduleId: module.id, 
selector: 'demo-login', 
templateUrl: './login.component.html', 
styleUrls: ['./login.component.css'] 
}) 

login.component.tns.html

<StackLayout class="p-10"> 
<Image src="res://logo_login" stretch="none" 
horizontalAlignment="center"></Image> 
<TextField [(ngModel)]="email" [hint]="Email Address"  
keyboardType="email" autocorrect="false"  
    autocapitalizationType="none"></TextField> 
<TextField [(ngModel)]="password" [hint]="Password" secure="true"> 
</TextField> 

<Button [text]="signin'" class="submit-button" (tap)="login(user)"> 
</Button> 
<Button [text]="signup'" (tap)="signup(user)"></Button> 
</StackLayout> 

app.component.tns.html

<ActionItem nsRouterLink="/login" ios.position="right" 
android.position="popup"> 
<Button [text]="'LOGIN' | translate" class="action-item"></Button> 
</ActionItem> 

实际上我需要放置选择器(demo-login)。任何一个请帮我解决这个问题。任何帮助将非常可观,真正有用。

回答

0

猜测,但不应该是文件名login.component.tns.htmllogin.component.html

+0

nativescript filename是tns.html(angular2seedadvanced)https://github.com/NathanWalker/angular-seed-advanced – Khushi