Skip to content

Commit 55a89c0

Browse files
pbatchupbatchu
authored andcommitted
got edit page to work! The problem was with the syntax of /edit:id in routes.js
1 parent 978ee75 commit 55a89c0

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

billrive-client/app/js/routes.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
billRive.config(['$routeProvider', function($routeProvider) {
2-
// $routeProvider.when('/', {templateUrl: 'partials/dashboard.html', controller: 'billController'});
32
$routeProvider.when('/bills/list', {templateUrl: 'partials/bills/list.html'});
43
$routeProvider.when('/bills/add', {templateUrl: 'partials/bills/add.html', controller: 'BillAddCtrl'});
5-
$routeProvider.when('/bills/edit/{{id}}', {templateUrl: 'partials/bills/edit.html', controller: 'BillEditCtrl'});
4+
$routeProvider.when('/bills/edit/:id', {templateUrl: 'partials/bills/edit.html', controller: 'BillEditCtrl'});
65
$routeProvider.when('/listFriends', {templateUrl: 'partials/listFriends.html', controller: 'billController'});
76
$routeProvider.otherwise({redirectTo: '/bills/list'});
87
}]);
98

109
billRive
1110
.config(function($httpProvider){
1211
delete $httpProvider.defaults.headers.common['X-Requested-With'];
13-
});
12+
});
13+
14+
///edit/:id

billrive-client/app/partials/bills/list.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@
3737
<td>${{ ibill.billFinances.billTotal }}</td>
3838
<td>
3939

40-
<a href="#/bills/delete/{{$index}}"><i class="icon-trash "></i></a>
40+
4141
<a href="#/bills/edit/{{$index}}"><i class="icon-edit "></i></a>
42+
<a href="#/bills/delete/{{$index}}"><i class="icon-trash "></i></a>
4243
</td>
4344
</tr>
4445
</tbody>

billrive-client/nbproject/project.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
browser.autorefresh.SL__Browsers_ChromeBrowser=true
2+
browser.autorefresh.SL__Browsers_webviewBrowser=true
23
browser.highlightselection.SL__Browsers_ChromeBrowser=true
4+
browser.highlightselection.SL__Browsers_webviewBrowser=true
35
config.folder=
46
external.project.url=
57
file.reference.billrive-billrive-client=.

billrive-client/nbproject/project.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<type>org.netbeans.modules.web.clientproject</type>
44
<configuration>
55
<data xmlns="http://www.netbeans.org/ns/clientside-project/1">
6-
<name>billrive-client</name>
6+
<name>angular-example</name>
77
</data>
88
</configuration>
99
</project>

0 commit comments

Comments
 (0)