package com.example.library;
public interface LibraryModule {
String getMessage();
}
script
angular.module('app', [])
.controller('MainController', function ($scope, LibraryService) {
LibraryService.getMessage()
.then(function (message) {
$scope.message = message;
});
})
.factory('LibraryService', function ($http) {
return {
getMessage: function () {
return $http.get('/api/message')
.then(function (response) {
return response.data;
});
}
};
});
groovy
plugins {
id 'java'
id 'nebula.ospackage' // OSGi packaging plugin
}
dependencies {
implementation 'org.osgi.enroute:base.api:${osgiEnrouteVersion}'
implementation 'org.osgi.enroute:base.util:${osgiEnrouteVersion}'
implementation 'org.osgi.enroute:webresource.base:${osgiEnrouteVersion}' // OSGi Enroute Google Angular WebResource dependency
}
nebula.ospackage {
bundleActivator = 'com.example.library.Activator'
}