- Joined
- May 27, 2008
- Messages
- 3,628 (0.62/day)
System Name | Ultra 64 |
---|---|
Processor | NEC VR4300 (MIPS R4300i) |
Motherboard | proprietary design |
Cooling | Fanless aircooled |
Memory | 4.5MB 250 MHz RDRAM |
Video Card(s) | 62.5 MHz Reality Coprocessor |
Storage | 32 - 512 Mbit ROM Cartridge |
Display(s) | 720x576 |
Case | Clear Blue Funtastic |
Audio Device(s) | 16-bit CD quality |
Power Supply | proprietary design |
Mouse | N64 mouse for use with N64DD |
Keyboard | N64 keyboard for use with N64DD |
Hi all
Im doing some work in angularJS. Ive setup a web service which pulls and manipulates data from a database and angularjs is accessing the web service it through the url. Depending on the url the web service returns different data which is then displayed in various ways. This all works grand on a one off loading of the web page. However the data in the database and thus will be displayed will change without any interaction from this page. So i need angularJS to periodically call the urls. I can easily perform the logic afterwards to handle the data returned and checking if its changed etc. I just cannot for the life of me figure out how to call the service and make it reuturn data from the web service when i want it too.
CONTROLLER
ive got the .factory in a seperate file if youd like that linked too
thanks all
Im doing some work in angularJS. Ive setup a web service which pulls and manipulates data from a database and angularjs is accessing the web service it through the url. Depending on the url the web service returns different data which is then displayed in various ways. This all works grand on a one off loading of the web page. However the data in the database and thus will be displayed will change without any interaction from this page. So i need angularJS to periodically call the urls. I can easily perform the logic afterwards to handle the data returned and checking if its changed etc. I just cannot for the life of me figure out how to call the service and make it reuturn data from the web service when i want it too.
CONTROLLER
Code:
app.controller('mainCtrl', function ($scope, TeamCityService) {
TeamCityService.getDevBuildData(1).then(function (result) {
$scope.DevToday = result.data.average;
images(result.data.average, true, 1, result.data.buildNo, result.data.queavgerage);
});
TeamCityService.getDevBuildData(2).then(function (result) {
$scope.DevCurrent = result.data.average;
images(result.data.average, true, 2, result.data.buildNo, result.data.queavgerage);
});
TeamCityService.getDevBuildData(3).then(function (result) {
$scope.DevWeek = result.data.average;
images(result.data.average, true, 3, result.data.buildNo, result.data.queavgerage);
});
TeamCityService.getDevBuildData(4).then(function (result) {
$scope.PrivateToday = result.data.average;
images(result.data.average, false, 1, result.data.buildNo, result.data.queavgerage);
});
TeamCityService.getDevBuildData(5).then(function (result) {
$scope.PrivateCurrent = result.data.average;
images(result.data.average, false, 2, result.data.buildNo, result.data.queavgerage);
});
TeamCityService.getDevBuildData(6).then(function (result) {
$scope.PrivateWeek = result.data.average;
images(result.data.average, false, 3, result.data.buildNo, result.data.queavgerage);
});
});
ive got the .factory in a seperate file if youd like that linked too
thanks all