Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<meta charset=utf-8 />
<title>ng-style</title>
</head>
  
<body ng-app>
  <div ng-controller="Ctrl" >
    <div>
      <p style="color:blue">Anna</p>
      <p ng-style="set_color()">Anna</p>
    </div>  
  </div> 
</body>
  
</html>
 
function Ctrl($scope){
  $scope.set_color = function (){
      return { color: "blue" };
  };
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers