I think I figured out why the page kept refreshing and I it was because I
had an "action" on the html form.
<form action="{{destination}}">
....
</form>
so when I press the button to take me to the next view the damn page kept
reloading and resetting all my factory variables.
Can't believe this problem was all because of HTML and nothing to do with
angularJS.
best,
greg
On Mon, Oct 6, 2014 at 11:23 AM, Greg Jang <[email protected]> wrote:
> thank you for the help!
> I'll check into service()
> fingers crossed
>
> On Sun, Oct 5, 2014 at 6:04 AM, Daniel Johnson <[email protected]> wrote:
>
>> > function formStorageFunc() {
>> > return {};
>> > }
>> > angular.service('formStorage', formStorageFunc);
>> >
>> > // in directive
>> > $scope.formData = formStorage();
>>
>> Forgot to past reference URL
>>
>> http://stackoverflow.com/questions/14324451/angular-service-vs-angular-factory
>>
>> --
>> teknotus (Take Notice)
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "AngularJS" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/angular/X05M1QWptAk/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Sent from my desktop!
>
--
Sent from my desktop!
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.