Skip to content

Fixed issue with promise while using checkout 'log' + added meteorJs packaging #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
angular:[email protected]
cyrilsabbagh:[email protected]
[email protected]
[email protected]
4 changes: 2 additions & 2 deletions dist/ngCart.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,10 @@ angular.module('ngCart.directives', ['ngCart.fulfilment'])
fulfilmentProvider.setService($scope.service);
fulfilmentProvider.setSettings($scope.settings);
fulfilmentProvider.checkout()
.success(function (data, status, headers, config) {
.then(function (data, status, headers, config) {
$rootScope.$broadcast('ngCart:checkout_succeeded', data);
})
.error(function (data, status, headers, config) {
.catch(function (data, status, headers, config) {
$rootScope.$broadcast('ngCart:checkout_failed', {
statusCode: status,
error: data
Expand Down
2 changes: 1 addition & 1 deletion dist/ngCart.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions package.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// package metadata file for Meteor.js
var packageName = 'cyrilsabbagh:ng-cart';
var where = 'client'; // where to install: 'client' or 'server'. For both, pass nothing.
var version = '1.0.0';
var summary = 'Shopping Cart built for AngularJS';
var gitLink = 'https://github.com/snapjay/ngCart';
var documentationFile = 'README.md';

// Meta-data
Package.describe({
name: packageName,
version: version,
summary: summary,
git: gitLink,
documentation: documentationFile
});

Package.onUse(function(api) {
api.versionsFrom(['[email protected]', '[email protected]']); // Meteor versions

api.use('angular:[email protected]', where); // Dependencies

api.addFiles('dist/ngCart.js', where); // Files in use
});
4 changes: 2 additions & 2 deletions src/ngCart.directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ angular.module('ngCart.directives', ['ngCart.fulfilment'])
fulfilmentProvider.setService($scope.service);
fulfilmentProvider.setSettings($scope.settings);
fulfilmentProvider.checkout()
.success(function (data, status, headers, config) {
.then(function (data, status, headers, config) {
$rootScope.$broadcast('ngCart:checkout_succeeded', data);
})
.error(function (data, status, headers, config) {
.catch(function (data, status, headers, config) {
$rootScope.$broadcast('ngCart:checkout_failed', {
statusCode: status,
error: data
Expand Down