Skip to content

Instantly share code, notes, and snippets.

@diegonetto
diegonetto / app.js
Last active August 29, 2015 14:03
AngularJS ModelService paradigm for sharing data between controllers
// Quick and dirty example that illustrates the ModelService paradigm
// for sharing data models between multiple controllers.
//
// Once `UserService` is injected into a controller and `UserService.login()`
// returns successfully, any expressions data-bound to properties of the
// `UserService.model` object in the scope of other controllers should be properly updated.
//
// In this example, model mutation is controlled within the context of the
// service, so only calls to `UserService.login()` will update `UserService.model`.
// It would also make since to have the UserService API expose an `update()`
@diegonetto
diegonetto / index.html
Created March 24, 2014 07:28
Using vendor assets with generator-ionicjs
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title>"Test3"</title>
<!-- build:css({.tmp,app}) styles/main.css -->
<link rel="stylesheet" href="styles/main.css">
<!-- endbuild -->