V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
coolicer
V2EX  ›  JavaScript

Angularjs: $element.scope()没有东西出来

  •  
  •   coolicer · 2014-01-08 15:53:37 +08:00 · 2811 次点击
    这是一个创建于 3758 天前的主题,其中的信息可能已经有所发展或是发生改变。
    jQuery/jqLite Extras
    Angular also provides the following additional methods and events to both jQuery and jqLite:

    Events
    ...

    Methods
    ...
    scope() - retrieves the scope of the current element or its parent.

    这里的意思是jq对象有这个scope方法吗?为什么我打印不出东西。
    1 条回复    1970-01-01 08:00:00 +08:00
    ThomasChan
        1
    ThomasChan  
       2014-01-08 16:47:05 +08:00
    要打印出东西来那也先得$element不是空的啊,写到directive里随便绑定个元素,就打印出来了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2926 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 00:28 · PVG 08:28 · LAX 17:28 · JFK 20:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.