阅读背景:

Angularjs指令:隔离范围和attrs

来源:互联网 

Please see the example here

请参见这里的示例

foodMeApp.directive('fmRating', function() {
  return {
    restrict: 'E',
    scope: {
      symbol: '@',
      max: '@',
      readonly: '@'
    },
    require: 'ngModel',
    link: function(scope, element, attrs, ngModel) {

      attrs.max = scope.max = parseInt(scope.max || 5, 10);
...
foodM



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: