The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

AngularJS Architecture: Edit Bookmark

AngularJS Architecture: Edit Bookmark

12:18
In this lesson, we are going to complete the functionality for editing a bookmark. We will start by augmenting the BookmarksModel and then updating the controller and view to utilize the new functionality. We will also update the BookmarksModel.getBookmarks to cache the bookmarks so that we are not overwriting our updates on every call.
Watch this lesson now
Avatar
egghead.io

In this lesson, we are going to complete the functionality for editing a bookmark. We will start by augmenting the BookmarksModel and then updating the controller and view to utilize the new functionality. We will also update the BookmarksModel.getBookmarks to cache the bookmarks so that we are not overwriting our updates on every call.

Avatar
Alex

When you click on the pencil icon to edit or the "Create Bookmark" link, where do the create/edit html templates get displayed? How does it know to render under the bookmarks??

Avatar
Alex

Also, the 'subscribe' feature on these threads does not work. It redirects me to "Uh oh, something went wrong. Why don't you watch a video instead."

Avatar
Alex

Last question - where does the category param come from in the below line:

$state.go('eggly.categories.bookmarks', {
category: $stateParams.category
})

Avatar
Santhosh Kumar

The entire app started out this way. The placement/rendering part was already done in https://egghead.io/series/angularjs-app-from-scratch-getting-started.

All he did in this series was make it modularized and move around the code, whereas the placement/structure hasn't changed.

In reply to Alex
Avatar
Chris

Quick question,
1. I'm unable to edit a bookmark in the root view.
2. But i am able to edit a bookmark after clicking into one of the categories.
Does anyone have advice on how i might troubleshoot this?

Avatar
Lukas

Hey Chris,
I just updated the master branch with a fix to this. I added a "category" parameter to the transition definition of a bookmark's edit state in the bookmarks template. Let me know if you have any more questions.

In reply to Chris
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?