Angular document.ready()问题

时间:2015-11-03 01:39:31

标签: javascript jquery angularjs

我在class USResident(Person): """ A Person who resides in the US. """ def __init__(self, name, status): """ Initializes a Person object. A USResident object inherits from Person and has one additional attribute: status: a string, one of "citizen", "legal_resident", "illegal_resident" Raises a ValueError if status is not one of those 3 strings """ Person.__init__(self, name) if status != 'citizen' and status != 'legal_resident' and \ status != 'illegal_resident': raise ValueError() else: self.status = status def getStatus(self): """ Returns the status """ return self.status 中包含了我的所有角度代码,并开发了一款工作正常的应用。然后我遇到了一个stackoverflow线程:How does document.ready work with angular element directives?这基本上意味着angular已经在'document.ready'事件中加载了它的模块,所以我试图删除所有的$(function(){...});但是没有它就会失败。角度应用程序应该如何开发,将角度代码封装在$(function(){...});内或没有呢?为什么在我的代码中删除封装无法工作,如果角度本身就能做到这一点?

0 个答案:

没有答案