Skip to content

Instantly share code, notes, and snippets.

@yhsiang
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yhsiang/9787138 to your computer and use it in GitHub Desktop.
Save yhsiang/9787138 to your computer and use it in GitHub Desktop.
angular
.module('lance',[])
.controller('listCtrl', ['$scope', function($scope){
$scope.legislators =[{
name: '丁守中',
avatars: '....',
emblem: 'img/kmt.svg',
choice: 'choice-unknown'
},
{
name: '王則含',
avatars: '....',
emblem: 'img/kmt.svg',
choice: 'choice-unknown'
}];
}]);
.legislator-slot(ng-repeat='legislator in legislators', ng-controller='listCtrl')
.avatar
img(ng-src='{{legislator.avatar}}'
.identity.row
.emblem
img(ng-src='legislator.emblem')
.name {{legislator.name}}
.choice(ng-class='{{legislator.choice}}') {{ legislator.choice | filter: toChinese }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment