I'm creating local app on nw.js with using angular.js. And i feel that i do something wrong, when in my controller i write something like this:
.controller('UserSettingsCtrl', function($scope, $mdDialog, $translate) {
var fs = require('fs');
var path = require('path');
var file = 'user_settings.json';
var filePath = path.join(nw.App.dataPath, file);
}
Is this a right way, to use require in every controller where i need node.js modules or other libraries ?
via Arti
No comments:
Post a Comment