user1765862
user1765862

Reputation: 14205

on view page load execute controller function, angularjs way

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?

Upvotes: 0

Views: 129

Answers (1)

Markus
Markus

Reputation: 1636

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

Upvotes: 3

Related Questions