mirror of
https://github.com/arnaucube/commonroutesApp.git
synced 2026-02-07 03:26:44 +01:00
from angular-material to pure ionic
This commit is contained in:
@@ -6,14 +6,11 @@
|
||||
// 'starter.controllers' is found in controllers.js
|
||||
|
||||
|
||||
//var urlapi = "http://localhost:3000/api/";
|
||||
//var urlapi="https://collectivecar.paas.primustech.io/api/";
|
||||
//var urlapi="http://147.83.7.158:3000/api/";
|
||||
var urlapi = "http://46.105.30.116:3000/api/";
|
||||
var urlapi = "http://localhost:3000/api/";
|
||||
//var urlapi = "http://51.255.193.106:3000/api/";
|
||||
|
||||
angular.module('starter', [
|
||||
'ionic',
|
||||
'ngMaterial',
|
||||
'ngCordova',
|
||||
'pascalprecht.translate',
|
||||
'app.login',
|
||||
|
||||
@@ -7,6 +7,10 @@ angular.module('app.notifications', ['pascalprecht.translate'])
|
||||
$http.get(urlapi + 'notifications')
|
||||
.then(function(data){
|
||||
console.log(data); // for browser console
|
||||
$scope.storageuser = JSON.parse(localStorage.getItem("cim_app_userdata"));
|
||||
$scope.storageuser.notifications = data.data;
|
||||
localStorage.setItem("cim_app_userdata", JSON.stringify($scope.storageuser));
|
||||
|
||||
$scope.notifications = data.data; // for UI
|
||||
$scope.$broadcast('scroll.refreshComplete');//refresher stop
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ angular.module('app.search', ['pascalprecht.translate'])
|
||||
}, function(data){
|
||||
console.log('data error');
|
||||
$scope.$broadcast('scroll.refreshComplete');//refresher stop
|
||||
$ionicLoading.show({ template: 'Error connecting server', noBackdrop: true, duration: 2000 });
|
||||
$ionicLoading.show({ template: 'Search error, need text to search', noBackdrop: true, duration: 2000 });
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user