0
我在寫一個使用Onsen,Monaca和AngularJS的跨平臺應用程序。Onsen AngularJS - 不顯示錶格數據
我有一個標準的LOGiN屏幕,用戶必須輸入他們的用戶ID,以便我可以通過API調用登錄它們。
但是,以下THIS示例從HERE我無法讓我的用戶ID顯示。任何人都可以看到我哪裏錯了嗎?
輸出我看到長相酷似這樣的:您的用戶名是:{{lastName的}}
包括所有的代碼。
的index.html
<!DOCTYPE HTML>
<html ng-app="myApp">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="Content-Security-Policy" content="default-src * data:; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">
<!-- Mobile web App Capable -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<title>Management</title>
<!-- Tests -->
<script type="text/javascript" src="js/app.js"></script>
<script src="components/loader.js"></script>
<script src="js/winstore-jscompat.js"></script>
<link rel="stylesshet" href="components/monaca-onsenui/js/angular/angular-csp.css">
<link rel="stylesheet" href="components/loader.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/style.css">
<script>
var myApp = angular.module('myApp', ['onsen']);
</script>
</head>
<body>
<ons-navigator var="myNavigator" page="login.html"></ons-navigator>
</body>
</html>
的login.html
<ons-page>
<ons-toolbar>
<div class="center">Login</div>
</ons-toolbar>
<div ng-controller="personController">
<form class="login-form" style="text-align: center" name="myForm">
<section style="padding: 8px">
<input type="password" class="text-input--underbar" required minlength="3" maxlength="4" placeholder="User ID" ng-model="firstName">
</section>
<section>
<div style="color: #015794; text-align: right">
<label class="checkbox--noborder">
<input type="checkbox">
<div class="checkbox__checkmark"></div>
<small>Remember Me</small>
</label>
</div>
</section>
<div ng-app="myApp" style="text-align: center; color: #889DA8">
Your User ID is: <br><strong>{{lastName}}</strong>
</div>
<section style="padding: 0 8px 8px">
<ons-button var="saveBtn" ng-disabled="myForm.$invalid" modifier="large" onclick="modal.show('modal')">Log In</ons-button>
</section>
</form>
</div>
</ons-page>
app.js
angular.module("myApp", []).controller("personController", function($scope)
{
$scope.firstName = "John";
$scope.lastName = "Doe";
});