directorlive / oppia

Automatically exported from code.google.com/p/oppia
Apache License 2.0
0 stars 0 forks source link

Simplify the oppia directives for objects #730

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently the boilerplate for the angular directives of our objects (under 
extensions) involves defining a getTemplateUrl() function to specify the 
template id in the javascript file. Then in the html file the resultant id does 
not appear because it is dynamically generated by core code when the object 
editor is needed. This system is somewhat cumbersome and opaque for object 
creators.

It should be changed so that in the object javascript files the template names 
are directly specified to be strings of the form 
'/object_editor_template/MyObject'. Then in the corresponding html file there 
should be a matching outer tag of the form <script type="text/ng-template" 
id="object_editor_template/MyObject">.

The desired system is already in place for interactions, so that can be used as 
a model.

For more information see the discussion here: 
https://code.google.com/p/oppia/source/browse/extensions/objects/templates/Coord
TwoDimEditor.js?spec=svncf3f5e9f57fcf88b52d9ec823eb5a3db84275885&r=cf3f5e9f57fcf
88b52d9ec823eb5a3db84275885#20

Original issue reported on code.google.com by jacobdav...@gmail.com on 27 Apr 2015 at 12:47