2024年4月29日 星期一

Node-Red Dashboard UI Template + AngularJS 參考 AngularJS教學 --3

 Node-Red Dashboard UI Template + AngularJS 參考 AngularJS教學 --3

AngularJS 實例

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdn.staticfile.net/angular.js/1.4.6/angular.min.js"></script> 
</head>
<body>

<div ng-app="" ng-init="quantity=1;cost=5">
<p>总价: {{ quantity * cost }}</p>
</div>

</body>
</html>

node-red Dashboard UI Template

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdn.staticfile.net/angular.js/1.4.6/angular.min.js"></script> 
</head>
<body>

<div ng-app="" ng-init="quantity=21;cost=25">
<p>數量: {{ quantity}}</p>
<p>單價: {{ cost }}</p>
<p>總價: {{ quantity * cost }}</p>
</div>

</body>
</html>

Node-Red 畫面


AngularJS 實例 /  node-red Dashboard UI Template


<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdn.staticfile.net/angular.js/1.4.6/angular.min.js"></script> 
</head>
<body>

<div ng-app="" ng-init="person={firstName:'John',lastName:'Doe'}">

<p>姓名 {{ person.firstName + ' '+ person.lastName }}</p>

</div>

</body>
</html>

Node-Red 畫面


沒有留言:

張貼留言

2026 作業3 RFID+ Telegram 練習

 2026 作業3  RFID+ Telegram  練習 (Wokwi 與 Telegram 二者溝通訊息反映比較慢 ) 歡迎 Alex 使用 RFID 控制系統 /on : 開啟 LED /off : 關閉 LED /flash : 閃爍模式 /timer : 開啟 5 秒 ...