Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var app;
- app = angular.module('home', []);
- app.controller('homeCtrl', function($scope, $http) {
- var getChatrooms;
- getChatrooms = function() {
- $http.get('/home/get_chatrooms').then(function(response) {
- $scope.data.chatrooms = response.data;
- });
- };
- $scope.data = {
- chatrooms: []
- };
- getChatrooms();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement