| 1234567891011121314151617181920212223242526272829303132333435363738 |
- /**
- * An element which displays USDA nutrition-style label.
- */
- (function() {
- (function() {
- try {return angular.module('ieat.ui')}
- catch {return angular.module('ieat.ui', [])}}
- )().component('nutritionLabel', {
- templateUrl: 'static/templates/nutritionLabel.html',
- bindings: {
- /* Food containing nutritional information */
- food: '<',
- },
- controller: ['$scope', function($scope) {
- var self = this;
- this.$onInit = function() {
- $scope.food = self.food;
- };
- $scope.calories_in_fat = 8.84;
- $scope.daily = {
- 204: 78, // Total Fat
- 606: 20, // Saturated Fat
- 601: 300, // Cholesterol
- 307: 2300, // Sodium
- 205: 275, // Total Carbohydrates
- 291: 28, // Dietary Fiber
- 320: 800, // Vitamin A (900 M, 700 F)
- 415: 1.15 + 1.2 + 15 + 1.3 + 2.4 + 5, // Vitamin B
- 401: 88, // Vitamin C (90 M, 75 F)
- 324: 15, // Vitamin D
- 301: 1300, // Calcium
- 303: 13, // Iron (8 M, 18 F)
- 306: 4700, // Potassium
- 432: 400, // Folate
- };
- }]
- });
- })();
|