I'm trying to display a row count from a php file in AngularJS
php
//count.php output displays 1500
echo json_encode($total);
angular
//navigationController.js
angular
.module('theme.core.navigation_controller', ['theme.core.services'])
.controller('NavigationController', ['$scope', '$location', '$timeout', function($scope, $location, $timeout) {
'use strict';
$scope.menu = [{
label: 'Overview',
iconClasses: '',
separator: true
}, {
label: 'Home',
iconClasses: 'glyphicon glyphicon-home',
url: '#/'
}, {
label: 'Clients',
iconClasses: 'glyphicon glyphicon-th-list',
html: '<span class="badge badge-warning">**1500**</span>',
url: '#/clients'
}, {
label: 'Map',
iconClasses: 'glyphicon glyphicon-map-marker',
url: '#/map'
}];
How do I pass the count to the angularjs file and display it instead of the 1500 in the angularjs file?