Search Posts

Author: Denny Pradipta

Production Server using PM2 sometimes didn’t run action inside routeChangeSuccess

I’m currently using Angular 1.3.8 and ExpressJS 4.9.8, and I found that in Production server, sometimes it didn’t run any action that I defined in AngularJS controller’s routeChangeSuccess. I ran my NodeJS app using PM2, cluster mode. So right now, I have process 1-4. All process is running with NODE_ENV=production. For example here’s one of the code that’s going to be ran when the page loads: app.controller(‘ViewController’, [‘$scope’, ‘$http’, ‘$route’, ‘$location’, ‘$sce’, ‘$window’, ‘$q’, ‘$modal’, […]

Added Input File through JQuery, didn’t submit any data in Angular Controller

First of all, sorry for bad english. I have some problems with Angular 1 and JQuery. Now here’s the thing. In the view, there is a button that adds up a file-type input box. Here is the code in Pug. .col-md-8.form-group#upload-photos input.form-control(type=”file”, ng-file-select=””, name=”photos[0]”, ng-model=”photos[0]”, accept=”image/*”) .col-md-1 a.btn.btn-success#add-photos | <i class=”fa fa-plus”></i> The button, which is the #add-photos will add a file-type input in the #upload-photos div. I have a code in Angular Controller that […]