我正在開發一個使用AngularJS的應用程序。我想更新路由更改中的元標記。
我該如何更新AngularJS中的元標記,它可以在頁面上的「查看源代碼」中顯示?如何更新AngularJS中的元標記?
這裏是一個HTML代碼 -
<!DOCTYPE html>
<html ng-app="app">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="fragment" content="!" />
<meta name="title" content="Test App">
<meta name="description" content="Test App">
<meta name="keywords" content="Test,App">
<link rel="stylesheet" href="css/jquery-ui-1.10.2.custom.min.css" />
<link rel="stylesheet" href="css/extra.css" />
<script src="js/libs/jquery-1.8.3.min.js"></script>
<script src="js/libs/jquery-ui-1.10.2.custom.min.js"></script>
<script src="js/libs/angular.min.js"></script>
<script src="js/controller.js"></script>
<script src="js/routes.js"></script>
</head>
<body>
<div ng-controller="mainCtrl" class="main-container" loading>
<div class="container-holder">
<div class="container">
<div ng-include src='"elements/header.html"'></div>
<div ng-view class="clearfix"></div>
</div>
</div>
<div ng-controller="userCtrl" id="test">
<div class="container" class="login-container">
<div id="login-logo">
<img src="images/logo-300.png" alt="" class="login-img"/>
<br />
<div ng-view></div>
</div>
</div>
</div>
</body>
</html>
您是否在使用'ng-view',因爲在您的web應用程序中只有一個頁面應用程序只改變視圖? – callmekatootie 2013-04-20 12:09:48
你無法更新'view source' ...這是服務器發送的內容。更詳細地解釋你想做什麼 – charlietfl 2013-04-20 12:14:42
是的,我正在使用ng-view .. – Amb 2013-04-20 12:15:41