2 angular.service('conference', function($resource){
3 this.Work = $resource( '/data/conference/Work/' );
4 }, {$inject:['$resource'],$creation:'eager'});
11 authors:[ { name:'', surname:'', inst:'', 'email':'' } ],
15 WorkForm.prototype = {
17 this.work = angular.copy(this.master);
21 this.saved = new this.Work( this.work );
22 console.debug( 'new', this.saved, 'from', this.work );
23 this.work = this.saved;
27 console.debug( 'work', this.work );
32 <div ng:controller="WorkForm">
38 <label>Vrsta rada:</label><br/>
39 <input type="radio" name="work.type" value="simp"> Simpozij <br/>
40 <input type="radio" name="work.type" value="pred"> Predavanje <br/>
41 <input type="radio" name="work.type" value="poster"> Poster <br/>
42 <input type="radio" name="work.type" value="round"> Okrugli stol <br/>
45 <div ng:repeat="author in work.authors">
46 [<a href="#" ng:click="work.authors.$remove(author)">X</a>]
47 <input name="author.name" ng:required>
48 <input name="author.surname" ng:required>
49 <input name="author.inst" >
50 <input name="author.email" ng:required>
52 [<a href="#" ng:click="work.authors.$add()">Add another author</a>]
57 Naslov: <input name="work.title" size="60"><br/>
60 <input type="submit" value="Save" ng:click="save()" disabled="{{$invalidWidgets}}">
66 {{$window.location.href}}
67 <pre>work = {{work}}</pre>
68 <pre>master = {{master}}</pre>