title: How to pass scope variable in ng-init using AngularJS
body: <p>I have problem passing the variable declared from the scope to ng-init: </p>
  
  <p>so far I have something like this:</p>
  
  <pre><code>$scope.x = '10';
  
  &lt;div ng-controller = "controller" ng-init="function(x)"&gt;
  </code></pre>
  
  <p>How do I pass x var from the scope inside ng-init function?</p>