Skip to content

angular scope inheritance

Sébastien LUCAS edited this page Mar 11, 2015 · 2 revisions

With app.run, we can define some variable that is useful form all controllers

.run(function (DS) {
    // We don't register the "User" resource
    // as a service, so it can only be used
    // via DS.<method>('user', ...)
    // The advantage here is that this code
    // is guaranteed to be executed, and you
    // only ever have to inject "DS"
    DS.defineResource('user');
  })

WIKI by Sébastien Lucas CEO & Funder or Bricks

Clone this wiki locally