I have a controller in AngularJS with only this code:

app.controller('PublishersController', function($scope, scaffold) {
>     scaffold($scope, {model: "Publishers"});
> });


And view with such code:

<tbody ng-repeat="publisher in items">
>   <tr ng-show="!ui.isEditing($index)">
>     <td>{{ publisher.name }}</td>
>     <td>
>       <ul>
>         <li ng-repeat="email in publisher.emails">{{ email }}</li>
>       </ul>
>     </td>
>     <td>
>       <a ng-click="ui.edit($index)">&#9998;</a> |
>       <a ng-click="ui.remove($index)">&#x2718;</a>
>     </td>
>   </tr>
>   <tr ng-show="ui.isEditing($index)" ng-class="{error: publisher.$errors}">
>     <td>
>       <input type="text" ng-model="publisher.name" placeholder="Name" />
>       <ul ng-show="publisher.$errors" class="error">
>         <li ng-repeat="name in publisher.$errors.name">{{ name }}</li>
>       </ul>
>     </td>
>     <td>
>       <textarea type="text" ng-model="publisher.emails" 
> placeholder="Emails" ng-list /></textarea><br/>
>       <i>(use `,` as separator)</i>
>       <ul ng-show="publisher.$errors" class="error">
>         <li ng-repeat="email in publisher.$errors.emails">{{ email }}</li>
>       </ul>
>     </td>
>     <td>
>       <a ng-click="ui.edit()" title="Save">&#x2611;</a> |
>       <a ng-click="ui.edit(false)" title="Cancel">&#x2612;</a>
>     </td>
>   </tr>
> </tbody>


All is working fine - I have listing and inline editing.

So - I modified the code and made another page - for prices. So, I get the 
listing and the inline editing functionality.

The problem is that when I press the "Edit" button and after that I submit 
- the POST goes to the "/prices" URL instead of "/prices/{price_id}". As is 
does in the case with the publishers.

So ... what am I doing wrong? ... (I can't find any place this URL is 
defined or set or whatever ...)

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to