0

Inside angularjs view I want to call controller function. This function shuold be called on page load. Should I follow classic syntax like in asp.net mvc razor view forexample (using ajax) or there is some angularjs specific way to do this?

1
  • 1
    Just refer to ng-init directive Commented Jun 22, 2015 at 10:57

1 Answer 1

3

Anything done at page load should be done in the controller itself or in a directive definition, not in the view.

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

Comments

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.