阅读背景:

为什么我不能获得自定义指令的属性值?

来源:互联网 

The angularjs code:

angularjs代码:

app.directive('test', function(){
  return {
    restrict: 'A',
    scope: {
      myId: '@'
    },
    link: function(scope) {
      alert(scope.myId);
    }
  }
});
app.direct



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

分享到: