Skip to content

Commit 56d0962

Browse files
committed
Added ui app.js
Updated index with first angular code
1 parent 6e4f95d commit 56d0962

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ typings/
7474

7575
?temp
7676

77-
local.json
77+
config/local.json

public/assets/js/app/app.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
var softEtherAdmin = angular.module('softEtherAdmin', []);
2+
3+
softEtherAdmin.controller('HeaderController', function ($scope) {
4+
var self = this;
5+
self.serverName = '-unknown-';
6+
7+
$.get( "api/server/about", function( data ) {
8+
$( ".result" ).html( data );
9+
alert( "Load was performed." );
10+
self.serverName = '-unknown-';
11+
});
12+
});

public/index.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<!doctype html>
2-
<html lang="en">
2+
<html lang="en" ng-app="softEtherAdmin">
33

44
<head>
55
<meta charset="utf-8" />
66
<link rel="icon" type="image/png" href="assets/img/favicon.ico">
77
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
8+
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.2/angular.min.js"></script>
89

910
<title>SoftEher Admin</title>
1011

@@ -27,6 +28,7 @@
2728
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300' rel='stylesheet' type='text/css'>
2829
<link href="assets/css/pe-icon-7-stroke.css" rel="stylesheet" />
2930

31+
<script src="assets/js/app/app.js" ></script>
3032
</head>
3133

3234
<body>
@@ -79,11 +81,11 @@
7981

8082
<!-- MAIN PANEL HEADER -->
8183

82-
<div class="main-panel">
84+
<div class="main-panel" ng-controller="HeaderController as hc">
8385
<nav class="navbar navbar-default navbar-fixed">
8486
<div class="container-fluid">
8587
<div class="navbar-header">
86-
<span class="navbar-brand">NotiServer</span>
88+
<span class="navbar-brand">{{hc.serverName}}</span>
8789
</div>
8890
</div>
8991
</nav>
@@ -102,7 +104,7 @@ <h4 class="title">Email Statistics</h4>
102104
</div>
103105
<div class="content">
104106
<div id="chartPreferences" class="ct-chart ct-perfect-fourth"></div>
105-
107+
1 + 2 = {{1 + 2}}
106108
<div class="footer">
107109
<div class="legend">
108110
<i class="fa fa-circle text-info"></i> Open

0 commit comments

Comments
 (0)