Angular: CSS styling
http://angularjs.org/
HTML
<div ng-controller="MyCtrl" >
<div ng-repeat="item in itemsToShow" >
<!--THIS IS THE EXPRESSION THAT I WANT DYNAMIC-->
{{item.name}}, {{item.title}}
</div>
</div>
JavaScript
var myApp = angular.module('myApp', []);
function MyCtrl($scope) {
var items = [
{
name: 'Misko',
title: 'Angular creator'},
{
name: 'Igor',
title: 'Meetup master'},
{
name: 'Vojta',
title: 'All-around superhero'}
];
var items2 = [
{
name: 'Misko_2',
title: 'Angular creator_2'},
{
name: 'Igor',
title: 'Meetup master'},
{
name: 'Vojta',
title: 'All-around superhero'}
];
var show_items_2 = true;
/*Whatever you want to do here*/
if(show_items_2) {
$scope.itemsToShow = items2;
} else {
$scope.itemsToShow = items;
}
}