title: angular.js: equivalent of domReady
body: <p>Warning: Angular newbie ahead.</p>
  
  <p>I have this code in an angular.js page</p>
  
  <pre><code>  &lt;div class="clearfix" ng-controller="Controller"&gt;
  
      &lt;h1&gt;Active Ideas 
      &lt;button type="button" ng-click="search()"&gt;get Ideas&lt;/button&gt;&lt;/h1&gt;
      &lt;hr&gt;
  </code></pre>
  
  <p>and then I have defined my controller as:</p>
  
  <pre><code>function Controller($scope, $http) {
    $scope.search = function(){...
  </code></pre>
  
  <p>And it works fine.</p>
  
  <p>I'd like to execute search() function when the dom is ready...</p>
  
  <p>I tried calling it from a $(function() {... but I don't know how to manually execute a method from my controller</p>
  
  <p>Also tried with</p>
  
  <pre><code>$scope.$on('$viewContentLoaded', function() {
  </code></pre>
  
  <p>But couldn't make it work (and couldn't find much documentation either...)</p>