This file contains 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
class ProfileAction { | |
constructor{} | |
//action creators | |
syncProfile() { | |
this.fetchProfile() | |
.then(old_profile => this.fetchProfileDetailsFrom3rdParty()) | |
.then(new_profile => this.syncProfileDetails(old_profile, new_profile)) | |
.then(new_profile => this.dispatch(this.syncProfileSuccess(new_profile))) |
This file contains 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
if (!this.account) { | |
return $http | |
.post('/api/account/get', {}) | |
.then((r) => { | |
this.account = BaseModel.parse(r); | |
return BaseModel.parse(r); | |
}); | |
} | |
else { | |
let deferred = $q.defer(); |
This file contains 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
gulp.task('dev', ['default'], function() { | |
gulp.src(['./www/js/app.js']) // build directory | |
.pipe(replace('@@ENV', 'https://dev-api-url')) | |
.pipe(gulp.dest('./www/js/app.js')); | |
}); | |
// returns error: Error: EEXIST: file already exists, mkdir '/Users/avallejo/Sites/cpIonic/www/js/app.js' |