JSFiddle

  • Populating Selects

    http://angularjs.org/

    var myApp = angular.module('myApp',[]);
    
    
    function MyCtrl($scope) {
        
        $scope.dropDownOptions = [
        { name: 'Feature', value: 'feature' }, 
        { name: 'Bug', value: 'bug' }, 
        { name: 'Enhancement ...
  • AngularJS Example: Value Copy #30 is the latest revision

    No-Library (pure JS), HTML, CSS, JavaScript

    angular.module('SharedDirectives', [])
        .directive('mpValueCopy', function($parse) {
            return function(scope, element, attrs) {
                if (attrs.ngModel) {
    
                    if (element[0].type == "radio ...
  • AngularJS Example: First #11 is the latest revision

    No-Library (pure JS), HTML, CSS, JavaScript

    function FirstController($scope) {
    
    
        $scope.yourName = 'World';
    }
        
  • AngularJS Example: Second

    No-Library (pure JS), HTML, CSS, JavaScript

    function TodoCtrl($scope) {
      $scope.todos = [
        {text:'learn angular', done:true},
        {text:'build an angular app', done:false}];
    
      $scope.addTodo = function ...
  • AngularJS Example: 1.0.2

    No-Library (pure JS), HTML, CSS, JavaScript

    <div ng-app>
      <div>
        <label>Name:</label>
        <input type="text" ng-model="yourName" placeholder="Enter a name here">
        <hr>
        <h1>Hello {{yourName}}!</h1>
      </div>
    </div>
    
  • AngularJS Example:

    No-Library (pure JS), HTML, CSS, JavaScript

    <div ng-app>
      <div>
        <label>Name:</label>
        <input type="text" ng-model="yourName" placeholder="Enter a name here">
        <hr>
        <h1>Hello {{yourName}}!</h1>
      </div>
    </div>
    
  • $http post with /echo/json/

    jQuery 1.7.2, HTML, CSS, JavaScript

    var myApp = angular.module('myApp',[]);
    
    function Ctrl($scope, $http){
        var data = $.param({
            json: JSON.stringify({
                text: 'some text',
                array: [1 ...
  • Angular: Empty rc5

    http://angularjs.org/

    var myApp = angular.module('myApp',[]);
    
    //myApp.directive('myDirective', function() {});
    //myApp.factory('myService', function() {});
    
    function MyCtrl($scope) {
        $scope.name = 'Superhero';
        
        
        $scope ...
  • AngularJS Mask directive #12 is the latest revision

    No-Library (pure JS), HTML, CSS, JavaScript

    angular.module('MyReverseModule', [])
    .directive('uiMask', function() {
        return {
          require: 'ngModel',
          scope: {
            uiMask: 'evaluate'
          },
          link: function($scope, element, attrs, controller) {
            controller.$render ...
  • AngularJS Title directive

    No-Library (pure JS), HTML, CSS, JavaScript

    angular.module('MyReverseModule', []);
    
    function Ctrl($scope) {
      $scope.greeting = 'hello';
        
        
        $scope.items = [{name:'adam', info:'hello'}, {name:'john', info:'world'}];
        
        
        $scope ...