Michael Freake Michael Freake - 1 year ago 79
AngularJS Question

AngularJS loading data on page load

I'm new to AngularJS and trying to setup an app that reads an RSS feed and displays the items upon page load.

I have figured out how to have the data loaded and displayed upon clicking a link (see fiddle), but can't figure out how to have this happen on page load.

My thought is that I'm not using

properly or should be using a model.

Any help is appreciated.

Code: http://jsfiddle.net/mikeyfreake/Lzgts/312/

Answer Source

Just call the method $scope.loadFeeds() after defining the method itself.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download