1

ok,nice to meet you guys .first im a newbie with angularjs.this is my question . my application is about site that require user to login . when user still not logged in.i want to using my router config that inside "A" module. when user logged in , i want to using "B" module that have another route config too . so , i want my application to change it modules mode ("ng-app") when runtime and condition meets(user login). please help me .thanks ..

Gery Ruslandi
  • 89
  • 1
  • 9
  • see if you ca figure something out from [this](http://stackoverflow.com/questions/17043804/communication-between-modules-in-angularjs) – sTx Feb 02 '17 at 11:12
  • i still dont get it sir .. what i want is that my web app can change it route config on runtime when user logged in . what i know to aproach this condition ,i must change my active module app(ng-app) to another module app that have dfferent route config. so i have "A" module app for user that not logged in , and i have "B" module for user that already logged in. @sTx – Gery Ruslandi Feb 02 '17 at 12:12
  • your app is not a single page application - you have multiple full html pages? look [here](http://stackoverflow.com/questions/20902353/angularjs-route-to-another-page-of-different-ng-app-module-after-login) for some same problem, i think – sTx Feb 02 '17 at 13:49
  • personally never faced such a problem – sTx Feb 02 '17 at 13:50
  • maybe [this](http://stackoverflow.com/questions/18571301/angularjs-multiple-ng-app-within-a-page) can help too - sorry but I cannot help more than that – sTx Feb 02 '17 at 14:03
  • do you have a specific reason of using 2 modules with there own routing? – sTx Feb 02 '17 at 14:05
  • and last; since you're new to angular try to learn angular2 instead – sTx Feb 02 '17 at 14:07
  • thanks sir .i appreciate your help.i will try my best @sTx – Gery Ruslandi Feb 03 '17 at 11:08
  • and one last question too.im still new to this angularjs .. you say that i must learn from angular2 .why sir ? is there are many different between the latest angularjs and v2 ? – Gery Ruslandi Feb 03 '17 at 11:11
  • Angular 2 is totally different from Angular 1 - What I've said was this: because you are already new to angular universe why not learn the newest version of it since they are completely different from each other as implementation, and the evolution of angular is with Angular 2 – sTx Feb 03 '17 at 12:14
  • it's more difficult to learn at start but when you get used to it it's so much powerful and simpler - I'm a beginner to with 2 I was a beginner with 1 too but now that I've get used to 2 I wouldn't get back to 1 :) – sTx Feb 03 '17 at 12:17
  • BTW: Welcome to StackOverflow community :) Best Regards! – sTx Feb 03 '17 at 12:19
  • Thanks sir for your answer and solution. Haha silly me, i dont know that angularjs 2 is exist. Im creating my project with ionic 1 and this framework require us to using angularjs 1 too. So i know this angularjs 1 from ionic. Haha, my project deadline is 10 day left,for now i'll using angularjs 1. Next project i'l using angularjs 2. Thanks sir. You help me a lot. Thankss @sTx – Gery Ruslandi Feb 03 '17 at 18:25
  • Aha, there is ionic 2 too with native app support – sTx Feb 04 '17 at 07:54

0 Answers0