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

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

For example If i want to show a loader, i can't put it into a service, right ?
Look at the source for ui-bootstrap. Great example.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.