Implementing the AngularJS Module and Controller to Support Comment Views

With the views finished, you need to implement the AngularJS controller code to support them. The views need the ability to get the page, photos, and comments. They also need the ability to add new comments.

You should provide two controllers: one for the photo comments and another for the comments on the full page. Because there are multiple controllers that need to interact with the server to get and add comments, it is also a good idea to create a service that handles getting and adding comments. The following sections describe the process of creating the full Angular JS code in Listing 27.18.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.239.178