-1

I've found an example here : http:// jsfiddle.net /HAKASHUN/2DNLH/5/ but he does not work.

I have a controller Post for example. And a controller AdminPost for admins. I don't want to rewrite all the functions in Post in my controller AdminPost.

I know i can create a factory like here : AngularJS controller inheritance

But I think it is not a very good "MVC" organization.

Thank you.

Community
  • 1
  • 1
user3803241
  • 29
  • 1
  • 5

1 Answers1

0

The majority of your business logic should reside in a "service/factory." Your controller should then just be a thin layer to call into the "services" Both controllers can then just inject in the service.

Justin Obney
  • 1,078
  • 3
  • 13
  • 25