Là form chính khi vào phần mềm sau khi đăng nhập
B1: vào xml_getList.aspx?file=SysFormHTML tạo đặt tên là TrangChu (có thể đổi tên khác(
B2: Vào xml_getdata.aspx?file=SysConfig.xml tìm mục số 4 nhập địa chỉ form vừa tạo
Ví dụ: xml_form_ds.aspx?name=NhaHang/TrangChu
B3: nếu dùng angular thì cú pháp html như sau:
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<div class="container-fluid" ng-app="myApp" ng-controller="myCtrl">
<script>
var app = angular.module("myApp", []);
</script>
<!-- HTML Data Get 1-->
<div ng-repeat="x in datas">
{{ x.TenCot}} <br />
</div>
<!-- END HTML Data Get 1-->
<!-- HTML Data Get 2-->
<div ng-repeat="x in datas2">
{{ x.TenCot}} <br />
</div>
<!-- END HTML Data Get 2-->
</div> <!-- ng-app="myApp" -->
<script>
app.controller('myCtrl', function($scope, $http) {
$scope.loadData_01 = function () {
$http({
method : "GET",
url : "Query_Do.aspx?name=NhaHang/TenQuery1&out=json"
}).then(function mySuccess(response) {
$scope.datas= response.data.Q1;
// alert($scope.datas);
}, function myError(response) {
alert( response.statusText );
});
} // end loadData_01
$scope.loadData_01 ();
$scope.loadData_02 = function () {
$http({
method : "GET",
url : "Query_Do.aspx?name=NhaHang/TenQuery2&out=json"
}).then(function mySuccess(response) {
$scope.datas= response.data.Q2;
// alert($scope.datas);
}, function myError(response) {
alert( response.statusText );
});
} // end loadData_02
$scope.loadData_02 ();
<iif-H>_common\plan\plan.js</iif-H>
$scope.loadDataPlan();
}); //app.controller('myCtrl',
</script>
** Nếu muốn include các module có sẵn như
Plan , Thu Chi (hiện tại chỉ có Plan)
cách chèn lệnh
Đường dẫn: /App_Data/html_form/_common/plan
Chèn ở HTML
Trong thẻ : <div class="container-fluid" ng-app="myApp" ng-controller="myCtrl">
<iif-H>_common\plan\plan.html</iif-H>
</div>
Chèn js
dưới: $scope.loadData_02 ();
<iif-H>_common\plan\plan.js</iif-H>
$scope.loadDataPlan();
xxx
Cách tạo form trang chủ