Or more simply change:

myApp.factory('tab', ...)

to:

myApp.service('tab', ...)

David is right, factory does expect that the factory function you supply 
will return the instantiated service. But since you’re already defining a 
constructor, you may as well use service, since that’s precisely what it’s 
for.

-- 
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.

Reply via email to