Skip to content

Releases: davej/angular-classy

v1.2.4

Choose a tag to compare

@davej davej released this 22 Aug 10:10

Now works with npm (thanks @mattlewis92).

npm install angular-classy

Usage:

const angular = require('angular');
const classy = require('angular-classy');

const app = angular.module('app', [classy]);

v1.2.3

Choose a tag to compare

@davej davej released this 07 Mar 14:15

Now you can programmatically get the classy version.

var app = angular.module('app', ['classy']);
console.log(app.classy.version); // -> '1.2.3'

V1.2.1

Choose a tag to compare

@davej davej released this 26 Feb 20:21

Added Source Map for angular-classy.min.js file.

v1.2.0

Choose a tag to compare

@davej davej released this 26 Feb 19:50

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

Choose a tag to compare

@davej davej released this 07 Mar 01:13

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

Choose a tag to compare

@davej davej released this 02 Mar 09:17

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

v1.0.0-rc.2 Pre-release
Pre-release

Choose a tag to compare

@davej davej released this 28 Feb 14:23

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

v1.0.0-rc.1 Pre-release
Pre-release

Choose a tag to compare

@davej davej released this 03 Feb 16:02

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

v1.0.0-beta.8 Pre-release
Pre-release

Choose a tag to compare

@davej davej released this 15 Jan 15:27

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

v1.0.0-beta.7 Pre-release
Pre-release

Choose a tag to compare

@davej davej released this 23 Oct 19:45
  • bindMethods happens in the init cycle instead of initBefore
  • Add explicit Coffeescript return statements to avoid side-effects (and slightly reduce filesize)