3 function Symposium($resource){
8 authors:[ { name:'', surname:'', inst:'', email:'' } ],
10 this.Symposium = $resource( '/data/conference/Symposium/:id', { id:'' } );
12 this.$watch('$location.hashPath', this.hash_change);
14 Symposium.$inject=['$resource'];
16 Symposium.prototype = {
17 hash_change: function() {
18 var id = this.$location.hashPath;
20 this.symposium = this.Symposium.get({ id: id });
24 console.debug( this.Symposium );
25 this.symposium = new this.Symposium( this.master );
28 var l = this.$location;
29 this.symposium.$save(function(symposium){
30 l.hashPath = symposium.$id;
34 if ( this.all ) return this.all;
35 this.all = this.Symposium.query();
36 console.log('$all', this.all);
43 <div ng:controller="Symposium">
45 <input type=checkbox name=debug>
48 <li ng:repeat="s in $all()">
49 <a href="#{{s.$id}}">{{s.title}}</a>
50 <br><small>{{s.abstract}}</small>
51 <pre ng:show="debug">{{s}}</pre>
55 <h1>Prijava simpozija</h1>
57 <div ng:show="symposium._id">
58 <a href="#{{symposium._id}}">permalink to {{symposium.title}}</a>
61 Naslov: <input name="symposium.title" size="60"><br/>
64 <textarea name="symposium.abstract" cols="50" rows="5"></textarea> <br/>
66 <div ng:repeat="author in symposium.authors">
67 [<a href="" ng:click="symposium.authors.$remove(author)">X</a>]
68 <input name="author.name" ng:required>
69 <input name="author.surname" ng:required>
70 <input name="author.inst" >
71 <input name="author.email" ng:required>
73 [<a href="" ng:click="symposium.authors.$add()">Add another author</a>]
77 <input type="submit" value="Save" ng:click="save();" disabled="{{$invalidWidgets}}">
78 <input type="reset" value="Reset" ng:click="reset()">
79 <a href="Symposium">Novi simpozij</a>