MegaPowerRockstar Posted February 16, 2018 Report Posted February 16, 2018 Hi Guys, I am trying to explore "gulp-ng-config" implementation for environment variables. Did anyone use it need help in implementing this. I did research online, but those examples dont help me in getting output. Since it it generates .json file to .js on the fly, i am like clueless whats going on. Can someone please help me this with complete implementation (from gulpfile.js to consuming them in module). I am stuck with issue unable to inject the .js file that will be generated. Quote
LolBob_Oath Posted February 16, 2018 Report Posted February 16, 2018 10 minutes ago, MegaPowerRockstar said: Hi Guys, I am trying to explore "gulp-ng-config" implementation for environment variables. Did anyone use it need help in implementing this. I did research online, but those examples dont help me in getting output. Since it it generates .json file to .js on the fly, i am like clueless whats going on. Can someone please help me this with complete implementation (from gulpfile.js to consuming them in module). I am stuck with issue unable to inject the .js file that will be generated. I can’t bro, ltt 1 Quote
MegaPowerRockstar Posted February 16, 2018 Author Report Posted February 16, 2018 some one pls jump in and help me... Angular + .net guys helppppppp Quote
karna11 Posted February 19, 2018 Report Posted February 19, 2018 Bro, Naku idea ledhu gulp set up, but veedi ki twitter loo Message cheyyi veedu respond avuthadu https://ntotten.com/ Quote
MegaPowerRockstar Posted February 19, 2018 Author Report Posted February 19, 2018 Thanks 2 hours ago, karna11 said: Bro, Naku idea ledhu gulp set up, but veedi ki twitter loo Message cheyyi veedu respond avuthadu https://ntotten.com/ thanks... Quote
MegaPowerRockstar Posted February 19, 2018 Author Report Posted February 19, 2018 Figured out the solution.... if anyone needs i will post it.. Quote
jpismahatma Posted February 19, 2018 Report Posted February 19, 2018 1 hour ago, MegaPowerRockstar said: Figured out the solution.... if anyone needs i will post it.. Fleez... Quote
Gunturgonguraa Posted February 19, 2018 Report Posted February 19, 2018 On 2/16/2018 at 12:01 PM, MegaPowerRockstar said: Hi Guys, I am trying to explore "gulp-ng-config" implementation for environment variables. Did anyone use it need help in implementing this. I did research online, but those examples dont help me in getting output. Since it it generates .json file to .js on the fly, i am like clueless whats going on. Can someone please help me this with complete implementation (from gulpfile.js to consuming them in module). I am stuck with issue unable to inject the .js file that will be generated. froxy call cheyi Quote
MegaPowerRockstar Posted February 19, 2018 Author Report Posted February 19, 2018 40 minutes ago, jpismahatma said: Fleez... Settings Json file (envSettings.json): { "global": { "version": "0.1.0" }, "env": { "local": { "EnvironmentConfig": { "SiteApi": "http://localhost:80405" } } } } In Gulpfile: // we can multiple for environment specific gulp.task('configuration', function () { return gulp.src('envSettings.json') .pipe(gulpNgConfig('application.config', { environment: [paths.env, 'global'] })) .pipe(gulp.dest('app/config/envSettings.js')); }); gulp.task('default', function () { paths.env = 'env.local'; runSequence('configuration'); }); Main app: angular.module('myapp', ['myapp.components', 'myapp.config']); In your controller: angular.module('myapp.components').directive('userUpgrade', userUpgrade); userUpgrade.$inject = ['EnvironmentConfig']; function userUpgrade(EnvironmentConfig) { console.log(EnvironmentConfig.SiteApi); } Quote
AlaElaAlaEla Posted February 19, 2018 Report Posted February 19, 2018 On 2/16/2018 at 12:16 PM, MegaPowerRockstar said: some one pls jump in and help me... Angular + .net guys helppppppp try for sometime, even if its not working, then self quit the job. Learn stuff and then join the new job. Quote
MegaPowerRockstar Posted February 19, 2018 Author Report Posted February 19, 2018 1 hour ago, AlaElaAlaEla said: try for sometime, even if its not working, then self quit the job. Learn stuff and then join the new job. i didnt invite people like you.... and moreover dont just randomly give replies.. no one uses gulp with .net first you know that... You do your selfish job Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.