-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Raymond de Wit
committed
Dec 14, 2014
1 parent
03f29fb
commit d71960f
Showing
3 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
( ( factory ) -> | ||
if typeof exports is "object" | ||
module.exports = factory( | ||
require "q" | ||
require "backbone" | ||
) | ||
else if typeof define is "function" and define.amd | ||
define( [ | ||
"q" | ||
"backbone" | ||
], factory ) | ||
|
||
)( ( Q, Backbone ) -> | ||
|
||
###* | ||
# Example of a model | ||
# | ||
# @author Raymond de Wit | ||
# @class ExampleModel | ||
# @static | ||
# @extends Backbone.Model | ||
# @moduletype model | ||
# @version 0.1 | ||
### | ||
class ExampleModel extends Backbone.Model | ||
|
||
defaults: | ||
propertyOne: "this should be a string" | ||
propertyTwo: true | ||
|
||
|
||
exampleAsyncFunction: ( callback ) -> | ||
|
||
setTimeout( () -> | ||
callback( true ) | ||
, 1000 ) | ||
) |