SHARE
TWEET
Untitled
a guest
Dec 22nd, 2014
155
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- booka.controller('createBookingController', ['$rootScope', '$scope', '$stateParams', '$modalInstance', 'Restangular', function($scope, $rootScope, $stateParams, $modalInstance, Restangular) {
- $scope.booking = {
- booking_date: $stateParams.booking_date,
- booking_time: $stateParams.booking_time
- };
- $scope.dismiss = function() {
- $modalInstance.dismiss();
- };
- $scope.save = function() {
- console.log('BOOKING CREATED BITCH');
- console.log($rootScope);
- Restangular.all('bookings').post($scope.booking).then(function(booking) {
- console.log($rootScope);
- $rootScope.$emit('bookings-updated');
- });
- $modalInstance.close('results');
- };
- }]);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

