JSFiddle

  • Angular: #104 is the latest revision

    http://angularjs.org/

    var app = angular.module('myApp', []);
    
    app.controller('MyCtrl', function($scope) {
        $scope.parentProp = { prop1: 'value1' };
    });
    app.directive('eDirective', function($parse) {
      return ...
  • Non-isolated Directive Test

    Test non-isolated directive

    angular.module('myApp', [])
    .controller('TestCtrl', ['$scope',function($scope) {
        $scope.user = {email: 'abc', name: 'myname'};
        $scope.testVar = "Test";
    }])
    .directive('emailUsed', [function ...
  • Angular JS - NG Model #74 is the latest revision

    jQuery 1.9.1, HTML, CSS, JavaScript

    var app = angular.module('my-app', [], function () {
    
    })
    
    app.controller('AppController', function ($scope, $log) {
        $scope.someObj = { model: ''};
        $scope.$watch('someObj.model', function ...
  • Angular: #20 is the latest revision

    http://angularjs.org/

    var app = angular.module('myApp', []);
    
    app.directive('myDirective', function () {
        return {
            template: '<div>{{count}}</div>',
            replace: false,
            transclude: false,
            restrict: 'A',
            scope: {
                count ...
  • Angular:

    http://angularjs.org/

    var app = angular.module('myApp',[]);
    
    app.directive('accRequired', function() {
        return function(scope, element, attrs) {
            var label = element.parent();
            if(label ...
  • Angular:

    http://angularjs.org/

    var app = angular.module('myApp', []);
    
    app.directive('accRequired', function ($compile) {
        return {
            link: function (scope, element, attrs) {
                var label = element.parent ...
  • Angular: #24 is the latest revision

    http://angularjs.org/

    var app = angular.module('myApp', []);
    
    app.directive('myElement', function () {
        return {
            restrict: 'E',
            scope: {
                person: '='
            },
            template: '<div>{{ person.name }}</div> <div>{{ person.age }}</div>'
        }
    });
    
    function ...
  • Angular: #12 is the latest revision

    http://angularjs.org/

    var app = angular.module('myApp', []);
    
    function ChildFormCtrl($scope) {
        $scope.someFn = function () {
            console.log('child', $scope.form);
            $scope.myForm.first_name.$setValidity ...
  • Angular:

    http://angularjs.org/

    var app = angular.module('myApp',[]);
    
    app.directive('creditcardWidget', function () {
        return {
            restrict: 'EA',
            template: '<div>isrequired={{isrequired()}}</div>',
            scope: {
                card: "=card",
                types: "=",
                months ...
  • Angular: #16 is the latest revision

    http://angularjs.org/

    var app = angular.module('myApp', []);
    
    app.directive('numberInput', function ($parse) {
        return {
            require: 'ngModel',
            link: function (scope, elm, attrs, ctrl) {
                var ...