a tour through angularjs

with Rails*

http://slid.es/urigorelik/angular

who am i?

  • Developer at Health Wave

  • Carleton University Student

  • JavaScript beginner

  • AngularJS beginner

More info

@urigorelik
g: ugorelik
e: uri.gore@gmail.com
w: urigorelik.com

What we'll be doing

  • 10 -15 Todo app
    • Basic HTTP requests
    • filters
    • directives

  • Ask questions make suggestions

Follow Along

https://github.com/ugorelik/ng-todo
git clone https://github.com/ugorelik/ng-todocd ng-todobundlegit checkout starting-pointrake db:migraterails sopen http://localhost:3000/ # mac only

Requires ruby 1.9.2+ and we'll mostly be working with the following files:

app/views/pages/show.html.erbapp/lib/assets/javascripts/angular/_ng_module.js
app/lib/assets/javascripts/angular/controllers/todo_ctrl.js


What we're using


Rails 4.0


erb templates


Agnular CDN

Angular Resource

markdown-js

Quick Rails structure overview


Angular loaded at the end of the <body>

Modules and relevant JS file are loaded per page with a `content_for` block.

why we'll be doing

  • Understand the basics
  • Get familiar with the syntax
  • Understand where it can be used


time to code