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

AngularJS Architecture: Create Bookmark

AngularJS Architecture: Create Bookmark

6:29
In this lesson, we will complete the functionality to create a bookmark. We start by adding a createBookmark method on the BookmarksModel and then making it available to the CreateBookmarksCtrl. From there, we flesh out the CreateBookmarksCtrl and refactor the template to use the new "Controller as" syntax.
Watch this lesson now
Avatar
egghead.io

In this lesson, we will complete the functionality to create a bookmark. We start by adding a createBookmark method on the BookmarksModel and then making it available to the CreateBookmarksCtrl. From there, we flesh out the CreateBookmarksCtrl and refactor the template to use the new "Controller as" syntax.

Avatar
Raul

In the function returnToBookmarks() how does $stateParams knows about .category, since category is no longer in the link on top of the page?

In reply to egghead.io
Avatar
Lukas

With ui-router, $stateParams is not dependent on URL parameters. The state of the application drives the parameters and in most cases but not all, the URL parameters will reflect that.

In reply to Raul
Avatar
Raul

My bad, actually the link is: #/categories/Development/bookmarks/create
so the :category is there. And yes, it seems that the url parameter is added to the existing state url. Thanks.

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