When I want to init a variable on first start up of a controller I do this in my view
<div ng-controller="testCtrl" ng-init="<%some var from server %>"> <div>
However, I'm now using ui-router like this:
.state('index', {
url: "/",
templateUrl: "/register-form.html",
controller: "testCtrl"
})
Because I no longer render the <div ng-controller=
etc how to I still init and pass my <%some var from server %>
from the template? register-form.html does not have the controller tag anymore because ui-router takes care of it.