我不确定这是如何工作的,但我需要在下面的代码中添加一个 if 语句。我知道 Javascript 但不知道 ember,我还在学习它 我的文件被称为:CatalogueListController.js 和代码:
App.CataloguelistController = Em.ArrayController.extend(Ember.PaginationSupport, {
needs: ["search", "accountBrowse"],
content: [],
total: 0,
isLoading: false,
outofcount: 0,
searchquery: '',
classid: 0,
attributelist: '',
processguid: '',
quotetypeMetaBinding: "App.metaDataController.QUOTETYPE",
addToBulk: function(context) {
var self = this,
accountguid = App.selectedAccountGuid,
quotetype = (context && context.metacode) ? context.metacode : App.currentQuotetype,
itemArray = [];
//some more code here
},
//i need to put the if here if it is for a certain accountguid then have
currentViewList: true,
currentViewBulk: false,
//else have this
currentViewList: false,
currentViewBulk: true,
mainPage: false,
andOr: [
{"name": "Match All", "value": "AND"},
{"name": "Match Any", "value": "OR"}
],
andOrSelected: 'AND',
我已经在需要 if 的地方发表了评论。请问有什么帮助吗?谢谢