Include initial angularjs files
This commit is contained in:
parent
b04d970132
commit
4c0e2dc743
|
@ -37,7 +37,7 @@ function xhtmlHeaders( $file, $title )
|
|||
extract( $GLOBALS, EXTR_OVERWRITE );
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="en" ng-app="ZoneMinder">
|
||||
<head>
|
||||
<title><?= ZM_WEB_TITLE_PREFIX ?> - <?= validHtmlStr($title) ?></title>
|
||||
<meta charset="utf-8">
|
||||
|
@ -69,6 +69,9 @@ function xhtmlHeaders( $file, $title )
|
|||
<?php
|
||||
}
|
||||
?>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js"></script>
|
||||
<script src="<?= getSkinFile('js/app.js'); ?>"></script>
|
||||
<script src="<?= getSkinFile('js/controllers.js'); ?>"></script>
|
||||
<script type="text/javascript" src="<?= $bootstrapJsFile ?>"></script>
|
||||
<script type="text/javascript" src="tools/mootools/mootools-core.js"></script>
|
||||
<script type="text/javascript" src="tools/mootools/mootools-more.js"></script>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
var ZoneMinder = angular.module('ZoneMinder', [
|
||||
'ZoneMinderControllers'
|
||||
]);
|
||||
|
||||
ZoneMinder.factory('Header', function($http) {
|
||||
return {
|
||||
getLogState: function(callback) {
|
||||
$http.get('/api/monitors.json').success(callback);
|
||||
}
|
||||
};
|
||||
});
|
|
@ -0,0 +1,7 @@
|
|||
var ZoneMinder = angular.module('ZoneMinderControllers', [])
|
||||
|
||||
.controller('HeaderController', function($scope, Header) {
|
||||
Header.getLogState(function(results) {
|
||||
console.log(results);
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue