Created
April 4, 2015 11:10
-
-
Save brandonio21/6099aa9c3731f57decae to your computer and use it in GitHub Desktop.
ingredients.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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