Hey Manukpk,
please check the calling sequence of your html code. Unless you call the constructor of your
MyCtrl1,
$rootScope.name is undefined.
When I switch the order in your HTML like this...
<body ng-app="myApp">
<div ng-controller="MyCtrl1">
<div ng-repeat="own in own">
{{own.IPDate}}
</div>
</div>
<div ng-controller="MyCtrl">
<div ng-repeat="name in nam">
{{name.IPDate}}
</div>
</div>
</body>
... I get the following output:
14/03/2016
14/03/2016
As a quick side note:
nam is not the best variable name and ng-repeating over
own in own is nasty variable shadowing. Do yourself a favor and get rid of this ;)
Hope this helps,
–Konstantin