Angular Basic

In this example below you will see how to do a Angular Basic with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by 1kohei1, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright 1kohei1 ©

Technologies

  • HTML
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Angular Basic</title>
  
  
  <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'>

  
  
</head>

<body>

  <div ng-app="app">
  <div ng-controller="controller as controller">
    <div ng-repeat="(key, val) in controller.a | filterObjects: {column: 'left'}">
      {{ key }}: {{ val }}
    </div>
  </div>
</div>
  <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular.min.js'></script>
<script src='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js'></script>

  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/1kohei1/angular-basic-oXOojd */
var app = angular.module('app', []);
app.controller('controller', controller);

controller.$inject = ['$timeout'];

function controller($timeout) {
  var _this = this;
  
  _this.a = {
    a: {
      a: 1,
      column: 'left'
    },
    b: {
      b: 2,
      column: 'right'
    },
    c: {
      c: 3,
      column: 'left'
    },
    d: {
      d: 4,
      column: 'right'
    }
  }
}

Comments