Releases: davej/angular-classy
v1.2.4
v1.2.3
V1.2.1
v1.2.0
Added support for bindWatchToClass
option
When you use the controllerAs syntax this allows you to set up a watcher that will bind to the class rather than the scope. This means you don't need to hardcode the controller name to your watch key.
Keywords ({object}
, {collection}
etc..) and expressions also work just like they did before.
// before 1.2
app.classy.controller({
__options: {
addToScope: false
},
watch: {
'todoCtrl.location.path()': function(newVal) { },
'{object}todoCtrl.todos': function(newVal) { },
}
});
// 1.2
app.classy.controller({
__options: {
addToScope: false,
bindWatchToClass: true
},
watch: {
'location.path()': function(newVal) { },
'{object}todos': function(newVal) { },
}
});
Remember you can also set options on a per-module basis (instead of per-controller). For example, to set options on the app
module:
app.classy.options.controller = {
addToScope: false,
bindWatchToClass: true
};
For more info and discussion see issue #49.
v1.1.0
No new features in this release but I've refactored the code.
- Classy is now written in Javascript instead of CoffeeScript. I still love CoffeeScript and will continue to use it for private projects but it's easier for people to contribute in Javascript so I decided to switch.
- I've done some benchmarking and performance optimisations. Classy 1.1 is over 2x faster than Classy 1.0.
FYI: The performance optimisations are not related to the switch from CoffeeScript to JS, it is a completely independent refactoring.
v1.0.0
Whoop!
Main features here: http://davej.github.io/angular-classy/1.0.html
Look through the pre 1.0 beta releases for a more comprehensive changelog: https://github.com/davej/angular-classy/releases
v1.0.0-rc.2
You can now do shorthand option declarations. A shorthand option declaration will be applied to all plugins. You can use shorthand options at both the controller or module level.
So, instead of:
__options: {
'bindData': {
addToScope: false
},
'bindMethods': {
addToScope: false
}
}
You can now write:
__options: {
addToScope: false
}
or:
app.classy.options.controller = {
addToScope: false
};
v1.0.0-rc.1
You can now define methods using angular expressions. Whenever the method is called it will evaluate the expression and return the expression's result. Often, an expression will be much more concise and readable than a full method definition.
Example usage:
methods: {
_getIncompleteTodos: 'todos | filter:{ completed: false }',
}
v1.0.0-beta.8
Accept addToClass
option to not add data/methods properties to Class (this
). Fixes #39
Example Usage:
myApp.classy.options.controller = {
bindData: {
addToClass: false
}
}
v1.0.0-beta.7
- bindMethods happens in the init cycle instead of initBefore
- Add explicit Coffeescript return statements to avoid side-effects (and slightly reduce filesize)