This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| myApp.service('DealRetrievalService', ['$http', function($http) { | |
| return { | |
| getAllDeals: function() { | |
| return $http.get('/dealRecord') | |
| .success(function(deals) { | |
| var temp = DealRetrievalService.removeExpiredDeals(deals.data); | |
| console.log('deals were:', temp); | |
| return DealRetrievalService.removeExpiredDeals(deals.data); | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'submitResult': function () { | |
| var playDetails = req.params.all().play; | |
| var userDetails = req.params.all().user; | |
| var user, play; | |
| Play.find({id: playDetails.id}) | |
| .then(function (playResult) { | |
| play = playResult; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app.service("googlePlusService", function($http, $rootScope) { | |
| return { | |
| start: function() { | |
| console.log('start'); | |
| this.renderGooglePlusButton(); | |
| }, | |
| renderGooglePlusButton: function() { | |
| console.log('render sign in button'); | |
| gapi.signin.render('signInButton', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var app = angular.module('myApp', []); | |
| function CartController($scope, Items) { | |
| $scope.bill = {}; | |
| $scope.items = Items; | |
| console.log(Items); | |
| $scope.$watch(function(){ //monitors any change | |
| console.log('here'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| context 'When loading the page for the first time' do | |
| setup do | |
| @account = FactoryGirl.create(:account, id: 1234) | |
| @user = FactoryGirl.create(:confirmed_user, account: @account) | |
| sign_in @user | |
| contact = FactoryGirl.create(:contact, account: @account) | |
| @fortune_company= FactoryGirl.create(:fortune_company, account_name: 'the Company') | |
| FactoryGirl.create(:contact_history, contact: contact, company_name: @fortune_company.account_name) | |
| FactoryGirl.create(:contact_history, contact: contact, company_name: @fortune_company.account_name) | |
| FactoryGirl.create(:contact_history, contact: contact, company_name: @fortune_company.account_name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| context 'When loading the page for the first time' do | |
| setup do | |
| contact = FactoryGirl.create(:contact) | |
| @fortune_company= FactoryGirl.create(:fortune_company, account_name: 'the Company') | |
| FactoryGirl.create(:contact_history, contact: contact, company_name: @fortune_company.account_name) | |
| FactoryGirl.create(:contact_history, contact: contact, company_name: @fortune_company.account_name) | |
| FactoryGirl.create(:contact_history, contact: contact, company_name: @fortune_company.account_name) | |
| FactoryGirl.create(:contact_history, contact: contact, company_name: @fortune_company.account_name) | |
| @account2 = FactoryGirl.create(:account, id: 1234) |
NewerOlder