GitLab oppdateres til siste versjon den 21.08.2019 ifra 08:00/08:30. Oppdatering estimert til å ta omtrent 20/30+ minutter.

Added the stuff form yesterdays workshop and a new readme file

parent c6b3969a
NSD Archivingportal Frontend
============================
This is the front end used to communicate with the REST-API created for the server-side of the Archivingportal.
Development dependencies
------------------------
This project has a rather small subset of dependencies, but they can be overwhelming for first time users.
All dependencies related to the development environment are contained within package.json
- node.js (this include npm)
- bower (installed by node)
- gulp (installed by node)
To install all dependencies, from the project root, simply run
> npm install -g bower
> npm install -g gulp
> bower install
Application dependencies
------------------------
These are dependencies uses by the actual application, and has nothing to do with the development environment.
They can be found inside bower.json
Running the application
-----------------------
First make sure you run, or tha there is an actual running instance for the server-side.
Then issue the following command (still in the project root)
> gulp serve
Packing the application
-----------------------
To package the application for release, simply (again in the project root), issue
> gulp dist
......@@ -27,7 +27,7 @@
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-6">
<ul class="nav navbar-nav">
<li class="active"><a ng-href="#">Home</a></li>
<li><a ng-href="#/schema">Send Schema</a></li>
<li><a ng-href="#/archive">Send Schema</a></li>
</ul>
</div>
</nav>
......@@ -61,6 +61,7 @@
<script src="scripts/services.js"></script>
<script src="scripts/directives.js"></script>
<script src="scripts/controller/MainController.js"></script>
<script src="scripts/controller/ArchivingController.js"></script>
<!-- inject:partials -->
<!-- endinject -->
<!-- endbuild -->
......
<div class="container">
archive
</div>
<div class="container">
{{nations}}
</div>
......@@ -19,6 +19,11 @@ archivingPortalClient.config(['$routeProvider', function ($routeProvider) {
controller: MainController
});
$routeProvider.when('/archive', {
templateUrl: 'partials/archive.html',
controller: ArchivingController
});
$routeProvider.otherwise({
redirectTo: '404.html'
});
......
'use strict';
var ArchivingController = function($scope, $log, Nations) {
$scope.form = {};
};
var schemaServices = angular.module('archivingPortalClient.nationServices', ['ngResource']);
var apiUrl = 'http://localhost:8080/';
var nationAll = 'nations/all';
var nationAll = 'nation/list';
schemaServices.factory('Nations', ['$resource',
function($resource) {
return $resource(apiUrl+nationAll, {}, {
return $resource(apiUrl+nationAll, {}, [{
query:{
//params can go here if we got any.
}
});
}]);
}
]);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment