nativescript ui页面无效

时间:2016-12-15 11:08:45

标签: nativescript angular2-nativescript

nativescript app成功部署在设备中,但点击登录按钮时,它会重定向到我的登录页面,但不会显示任何内容 我拥有的是:

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>

实际上我需要放置选择器(演示登录)。任何一个请帮我解决这个问题。任何帮助都会非常有意义并且非常有帮助。

1 个答案:

答案 0 :(得分:0)

猜猜,但不应该将文件名login.component.tns.html设为login.component.html