Branch: refs/heads/prototype
Home:
https://github.com/forge/scaffold-html5
Commit: d76982fd507f05af7ef60e482fd68ec74c365c68
https://github.com/forge/scaffold-html5/commit/d76982fd507f05af7ef60e482f...
Author: Vineet Reynolds <Vineet.Reynolds(a)gmail.com>
Date: 2013-02-05 (Tue, 05 Feb 2013)
Changed paths:
M src/main/resources/scaffold/angularjs/scripts/controllers.js.ftl
Log Message:
-----------
Fixed issue involving display of relationship references.
The generated scaffold now contains code to replace a JSON object reference in an
AngularJS Resource, with a reference to a Resource object present in a Resource
collection. This is done to pass the object identity (===) comparison test used by
AngularJS for HTML5 select elements. AngularJS requires that the ngModel bound to a
select, should also be present in the ngOptions array/collection, failing which it does
not display the bound model element. When a Resource with a JSON object is originally
obtained, the JSON object is not equal (===) to any element in the Resource
array/collection used by ngOptions; hence the need to replace the JSON object with an
actual element from the array/collection.