javascript - error with gulp-ng-annoate, couldn't process source due to parse error -


i getting trouble error generated gulp-ng-annoate.

error message

error: app.js: error: couldn't process source due parse error

i've found other thread seems have same problem me answer not work me. the other thread

here gulp file , files trying execute tasks.

gulpfile.js

var gulp = require('gulp') var concat = require('gulp-concat') //var uglify = require('gulp-uglify') var ngannotate = require('gulp-ng-annotate')  gulp.task('js', function(){     gulp.src(['ng/module.js', 'ng/**/*.js'])         .pipe(concat('app.js'))         .pipe(ngannotate())         //.pipe(uglify())         .pipe(gulp.dest('assets')) }) 

and files trying concat/ngannotate

module.js

angular.module('app', []) 

posts.ctrl.js

angular.module('app') .controller('postctrl', function($scope, postssvc){     $scope.addpost = function(){         if ($scope.postbody){             postssvc.create({                 username: 'dickeyxxx',                 body: $scope.postbody             }).success(function(post){                 $scope.posts.unshift(post)                 $scope.postbody = null             })         }     }      postssvc.fetch().success(function(posts){         $scope.posts = posts     }) }) 

posts.svc.js

angular.module('app') .service('postssvc', ['$http', function ($http){     this.fetch = function(){         return $http.get('/api/posts')     }     this.create = function(post){         return $http.post('/api/posts', post)     } }]) 

what have gone wrong..?

what wrong put . instead , separate object.

also, don't forget ; end line.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -