user3398172
user3398172

Reputation: 811

missing binded value in angularjs

http://plnkr.co/edit/hLsMPWp6O2uL4SheThLR?p=preview

I use push but {{tab.tabName}} return blank (line 46) in index.html

Upvotes: 1

Views: 42

Answers (2)

Nitish Kumar
Nitish Kumar

Reputation: 4870

in app.js

Replace:

$scope.tabs.push({
    "tabId": tabId = tabId + 1,
    "name" : capitaliseFirstLetter(this.NewTabName),
    "active" : true
});

To

$scope.tabs.push({
    "tabId": tabId += 1,
    "tabName" : capitaliseFirstLetter(this.NewTabName),
    "active" : true
});

Upvotes: 1

Omri Aharon
Omri Aharon

Reputation: 17064

This is your problem: (in app.js, under addTab function)

"name" : capitaliseFirstLetter(this.NewTabName),

Should be:

"tabName" : capitaliseFirstLetter(this.NewTabName),

Upvotes: 0

Related Questions