johannesjo / ng-fab-form

Convenient forms for Angular with no extra markup? Fabulous!
https://johannesjo.github.io/ng-fab-form
MIT License
172 stars 25 forks source link

ngFabForm fails to properly initialize when navigating to a futureState #79

Closed atgillette closed 9 years ago

atgillette commented 9 years ago

Hi,

I'm using futureState in combination with oclazyload and ng-fab-form. On 1st use of my application, the user is directed to a state contained in my shell application and ng-fab-form is able to properly initialize and perform validation. But if a user navigates to a futureState and refreshes the page, ng-fab-form cannot properly initialize. This issue is only impacting ng-fab-form, everything else renders and functions as expected. Ideas on why this is happening and how it can be fixed?

Thanks,

Adrian

johannesjo commented 9 years ago

Thanks for reporting this issue. I'm not familiar with futureState. Can you provide a plunkr by any chance?

atgillette commented 9 years ago

I don't think it's possible to setup the scenario on plunkr. But I can email you the project.

johannesjo commented 9 years ago

...

atgillette commented 9 years ago

Hi,

Did you get my email with the projects?

johannesjo commented 9 years ago

Yap thanks. I check it out once I'm back from vacation.

johannesjo commented 9 years ago

Hey there,

I digged a little into this issue. This issue seems to be that you're loading angular twice and probably more important: You do so after loading the other modules. If you comment out these lines in subapp.module.js

var ngModule = angular.module("app.subapp", [
  //'ng',
  //'ui.router',
]);

everything works as expected.

atgillette commented 9 years ago

Big thanks @johannesjo . That did the trick.