fix initialization

This commit is contained in:
Misko Hevery 2010-01-24 12:10:26 -08:00
parent b8ee8b8912
commit c7719c2412
2 changed files with 2 additions and 3 deletions

View file

@ -231,7 +231,6 @@ UrlWatcher.prototype = {
///////////////////////////////////////////////// /////////////////////////////////////////////////
function configureJQueryPlugins() { function configureJQueryPlugins() {
log('Angular.configureJQueryPlugins()');
var fn = jQuery['fn']; var fn = jQuery['fn'];
fn['scope'] = function() { fn['scope'] = function() {
var element = this; var element = this;
@ -334,7 +333,7 @@ function wireAngular(element, config) {
config['location']['listen'](_(binder.onUrlChange).bind(binder)); config['location']['listen'](_(binder.onUrlChange).bind(binder));
binder.parseAnchor(); binder.parseAnchor();
binder.executeInit(); binder.executeInit();
scope.updateView(); binder.updateView();
return self; return self;
}, },
'element':element[0], 'element':element[0],

View file

@ -70,7 +70,7 @@ Binder.prototype = {
}, },
updateAnchor: function() { updateAnchor: function() {
var url = this.location.get(); var url = this.location.get() || "";
var anchorIndex = url.indexOf('#'); var anchorIndex = url.indexOf('#');
if (anchorIndex > -1) if (anchorIndex > -1)
url = url.substring(0, anchorIndex); url = url.substring(0, anchorIndex);