zoukankan      html  css  js  c++  java
  • AngularJS -- Directive参数

    angular.module('myApp', []) 
    .directive('myDirective', function() { 
        return { 
            restrict: String, 
            priority: Number, 
            terminal: Boolean, 
            template: String or Template Function: 
          function(tElement, tAttrs) {...}, 
          templateUrl: String, 
          replace: Boolean or String, 
          scope: Boolean or Object, 
          transclude: Boolean, 
          controller: String or 
          function(scope, element, attrs, transclude, otherInjectables) { ... }, 
          controllerAs: String, 
          require: String, 
          link: function(scope, iElement, iAttrs) { ... }, 
          compile: // 返回一个对象或连接函数,如下所示:
          function(tElement, tAttrs, transclude) { 
              return { 
                  pre: function(scope, iElement, iAttrs, controller) { ... }, 
                  post: function(scope, iElement, iAttrs, controller) { ... } 
                 } 
              return function postLink(...) { ... } 
            } 
        }; 
     });
  • 相关阅读:
    素数算法问题
    字符指针和字符数组
    指针引用多维数组
    指针细节整理3
    指针细节整理2
    指针细节整理
    公约数和公倍数
    冒泡排序、选择排序
    如何写出高性能的sql语句?
    并发控制
  • 原文地址:https://www.cnblogs.com/lianfu/p/5497515.html
Copyright © 2011-2022 走看看