bigbluebutton-Github/labs/demos/public/js/app.js

23 lines
482 B
JavaScript
Raw Normal View History

2014-05-12 22:31:52 +08:00
var myModule = angular.module('landingPage', []);
2014-05-12 23:40:48 +08:00
2014-05-14 23:44:59 +08:00
myModule.controller('MainCtrl', function($scope, $http, $location, $window) {
2014-05-15 00:00:32 +08:00
$scope.postUsername = function() {
var account = {
"name": $scope.username,
2014-05-14 23:44:59 +08:00
"password": 'oOoOoO'
};
jQuery.getJSON("config.json", function (json) {
2014-05-15 00:00:32 +08:00
$http.post('/login', account).success(function(res) {
//alert(res.success.url);
2014-05-14 23:44:59 +08:00
//TODO check if I really need $location
$scope.myurl = res.success.url;
2014-05-12 23:40:48 +08:00
});
});
2014-05-12 22:31:52 +08:00
}
2014-05-14 23:44:59 +08:00
});