Skip to content

Instantly share code, notes, and snippets.

@brandonio21
Created April 4, 2015 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brandonio21/6099aa9c3731f57decae to your computer and use it in GitHub Desktop.
Save brandonio21/6099aa9c3731f57decae to your computer and use it in GitHub Desktop.
ingredients.js
angular.module('recipr', [])
.controller('IngredientListController', function() {
var ingredientList = this;
ingredientList.ingredients = [
{text:'5oz of oregano'},
{text:'3oz of thyme'}];
ingredientList.addIngredient = function() {
ingredientList.ingredients.push({text:ingredientList.ingredientText});
ingredientList.ingredientText = '';
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment