Knockoutjs for Grails

  • Authors : Igor Aguiar Rodrigues
0 vote
Dependency :
compile "br.com.geocontrol.grails.plugin.ko:knockoutjs:1.2.1.2"

Documentation

Summary

Provides necessary Javascript files for using Knockoutjs (http://knockoutjs.com/) with grails. Stable knockoutjs version: 1.2.1 Unstable knockoutjs version: 1.3.0rc

Installation

grails install-plugin knockoutjs

Description

About

Knockout is a JavaScript library that makes it easier to create rich, desktop-like user interfaces with JavaScript and HTML, using observers to make your UI automatically stay in sync with an underlying data model. It works particularly well with the MVVM pattern, offering declarative bindings somewhat like Silverlight but without the browser plugin. More information about knockout can be found here and here

Usage

After installing the plugin, the knockout javascript file can be included in a gsp using the following tag:
<ko:resources/>
There is an optional attribute called unstable (defaults to false) which configures which version of knockout will be used.

<ko:resources unstable="true"/> will pull the current development version.

  • Current stable version: 1.2.1
  • Current unstable version: 1.3.0rc

In development environment, <ko:resources/> will use the debug build (not minified), while in production the minified version will be used.

This plugin also integrates with the resources plugin. When using with resources plugin, the following modules can be used:

  • knockout - Stable minified version
  • knockout-dev - Stable debug version
  • knockout-unstable - Unstable minified version
  • knockout-unstable-dev - Unstable debug version

History

All changes can be found here: https://github.com/igoraguiar/grails-knockout/commits/master