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
import Ember from 'ember'; | |
var inject = Ember.inject; | |
export default Ember.Component.extend({ | |
//will load the service in file /app/services/shopping-cart.js | |
start: inject.service('start'), | |
checkValue: Ember.computed('record',function(){ | |
status = false | |
var name = this.get('record.name') | |
var value1 = this.get('record.value') | |
var value2 = this.get('record.new_value') | |
var keyPresent = this.get('start').check(name); | |
if (keyPresent == false) | |
{ | |
this.get('start').add(name); | |
console.log("Adding name", name, " in the service start"); | |
console.log(this.get('start')) | |
} | |
}) | |
}); |