Please fork this repo. On Friday, submit your work a pull request.
Fork and clone this repo. We'll be using a rails back end. It'll be a single model CRUD API for songs. Lets go into this directory and run all our initial rails setup and run our server.
$ cd wdi_radio_api
$ rake db:create
$ rake db:migrate
$ rake db:seed
$ rails s
This will be the backend we'll be using, from http://localhost:3000.
What follows are not explicit steps. Just guidelines to approach building out this angular application.
- Create a main directory for your
wdi_radio
application. - Create an
index.html
in your application's main directory. - Create a skeleton for your content and include all dependencies.
- Create the main
app.js
file and create the module for this angular app. - Create a module that defines songs.
As a user, when we go to the app, we see a welcome page. As a user, we should be able to see all of our songs in the database. As a user, we should be able to see a single song page.
- Add a router to the
app.js
. - Add a state for the routes
/welcome
and/songs
. - Create templates for these routes.
- Create a controller file and define a controller to handle songs.
- Create a factory for songs that point to the API we setup earlier.
- Remember to inject this dependency into the controller.
- Use directives in the html to list all songs
- Use directives in the html to view a single song(separate template)
- Implement full CRUD for songs
The same as before. We are refactoring existing functionality, not adding new features. Plus:
- As a user, when we select a song it starts playing. The world is a better place.
- Convert your existing controllers to custom directives. One at a time. Commit early, commit often.
- Show the song on the index page.
- When you click a song, it renders somewhere in the index
- Implement/refactor full CRUD for songs
- Get the song to play
- As a user, we should be able to identify ourselves (sign up, login, logout)
- As an authorized user, we should be able to favorite
- User can sign up, login, logout
- Authenticated user can favorite a song(s)
- Review and clean up, especially directives