$location, $timeout, $uibModal & $watch Services
$timeout:
$timeout(function () { c.simple = "How are you today?"; }, 2000);
$location
- c.myUrl = $location.absUrl();
- var url = $location.url();
- $location.search(table’, ‘incident’); // Set the parameter in the URL
- $location.search(); // Get the parameter from the URL
$uibModal is used to show a custom popup message:
c.modalInstance = $uibModal.open({ templateUrl: 'modalTemplate', scope: $scope }); $scope.closeModal = function (){ c.modalInstance.close() }
$watch is help was to watching particular variables:
$scope.$watch('name', function(newValue, oldValue) { alert('Value got chnaged New value: '+newValue+" Old value: "+oldValue); });
No responses yet