Advertisement
Guest User

Untitled

a guest
Sep 1st, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. <table class="txt_logged" ng-controller="mainCtrl" ng-show="{{userdetails}}">
  2.  
  3. .controller('mainCtrl',['$scope','SharedService',function($scope,SharedService)
  4. {
  5. $scope.userdetails=SharedService.getUserDetails();
  6.  
  7. $scope.$watch(function(){ return SharedService.getUserDetails()}, function(newValue, oldValue)
  8. {
  9. if (newValue && newValue !== oldValue)
  10. {
  11. var t= SharedService.getUserDetails();
  12. if(t.toString()=="true")
  13. {
  14. $scope.userdetails =true;
  15. }
  16. else
  17. {
  18. $scope.userdetails =false;
  19. }
  20.  
  21. }
  22. });
  23.  
  24. }]);
  25.  
  26. <table class="txt_logged" ng-controller="mainCtrl" ng-show="userdetails">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement