Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app='app'>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  <div ng-controller='AppController'>
    <div style="width:100px; word-wrap: break-word" ng-bind-html="renderHtml(newfield.showConditions)"></div>
  </div>
</body>
</html>
 
// angular
//   .module('app', [])
//   .controller('AppController', function ($scope, $sce) {
    
//     $scope.newfield = {
//       showConditions: 'gender <br /> vk'
//     };
  
//     $scope.renderHtml = renderHtml;
  
//     function renderHtml(string) {
//       return $sce.trustAsHtml(string);
//     }
//   });
angular.module('app', [])
  .factory('AppService', function ($q) {
    return {
      fun3: fun3
    };
  
    function fun3() {
      var defer = $q.defer();
      
      gapi.auth.authorize(
        {
          'client_id': CLIENT_ID,
          'scope': SCOPES.join(' '),
          'immediate': true
        }, handleAuthResult);
      
      function handleAuthResult (authResult) {
        if (authResult && !authResult.error) {
          defer.resolve(authResult);
        } else {
          defer.reject(authResult.error);
        }
      }
      
      return defer.promise;
    }
  });
Output

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

Dismiss x
public
Bin info
addi90pro
0viewers