Skip to content

Commit

Permalink
put in super call for router and model
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhys committed Jun 7, 2013
1 parent 6dacb6a commit 3d27677
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ or you can pass in an options object which should have the following signature:
*/
keys: string | Function
},
/*
/*
use this if you want to add a class when the first req is true, also clicking on the element will toggle the class
*/
onClass: string,
Expand Down Expand Up @@ -733,6 +733,10 @@ goog.inherits(app.MyControl, mvc.Control);

### changelog ###

### v1.0.7 beta ###

- call goog.base (super) for router and model constructor

### v1.0.6 beta ###

- added in new test for setting within a bind, no will not go in to infinite loop
Expand Down
2 changes: 1 addition & 1 deletion model.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ goog.require('mvc.Sync');
* schema and sync.
*/
mvc.Model = function(opt_options) {

goog.base(this);
// setup the defaults
var defaults = {
'schema': {},
Expand Down
7 changes: 4 additions & 3 deletions router.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ goog.require('goog.history.Html5History');
* document.write.
*/
mvc.Router = function(opt_noFragment, opt_blankPage, opt_input, opt_iframe) {
goog.base(this);
this.history_ = goog.history.Html5History.isSupported() ?
new goog.history.Html5History() :
new goog.History(!!(opt_blankPage && opt_noFragment), opt_blankPage,
Expand Down Expand Up @@ -105,8 +106,8 @@ mvc.Router.prototype.route = function(route, fn, opt_context) {
.replace(/\\\{/g, '(?:')
.replace(/\\\}/g, ')?') + '$');
var completeRoute = {
route: route,
callback: fn,
route: route,
callback: fn,
context: opt_context
};
//this.runRouteIfMatches_(completeRoute, this.currentFragment_);
Expand Down Expand Up @@ -134,7 +135,7 @@ mvc.Router.prototype.onChange_ = function() {
var fragment = this.history_.getToken();
if (fragment != this.currentFragment_) {
this.dispatchEvent({
type: mvc.Router.EventType.ROUTE_EXPIRED,
type: mvc.Router.EventType.ROUTE_EXPIRED,
previous: this.currentFragment_,
current: fragment
});
Expand Down

0 comments on commit 3d27677

Please sign in to comment.