0

Am new to Angular so not sure if this is actually possible - however is it possible to refresh/reload a controller, without refreshing the HTML page itself?

So in doing so any variables that are instantiated with the controller would be recalculated and simply updated in my view?

Thanks.

1 Answer 1

1

Yes. This is exactly what Angular is for - developing Single-Page Applications (SPAs). In fact, reloading a page is undesirable since you would lose all of your scope variables unless you are saving to/reading from cookies (or some other stateful solution).

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

4 Comments

Great. And to point me in the right direction how is this done - reloading controller without page refresh. Is it a line of code call?
Have you gone through any Angular tutorials? Start here.
Yes, I've built a basic app using multiple controllers, made services, a couple of custom directives and using ngRoute - however can't see anything to simply refresh a controller/one line. $route.reload still shows a very short refresh like effect
Is $route.reload() what you are looking for?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.