UNPKG

angular-material-npfixed

Version:

The Angular Material project is an implementation of Material Design in Angular.js. This project provides a set of reusable, well-tested, and accessible Material Design UI components. Angular Material is supported internally at Google by the Angular.js, M

32 lines (30 loc) 822 B
angular .module('radioDemo2', ['ngMaterial']) .controller('ContactController', function($scope, $filter) { var self = this; self.contacts = [{ 'id': 1, 'fullName': 'Maria Guadalupe', 'lastName': 'Guadalupe', 'title': "CEO, Found" }, { 'id': 2, 'fullName': 'Gabriel García Marquéz', 'lastName': 'Marquéz', 'title': "VP Sales & Marketing" }, { 'id': 3, 'fullName': 'Miguel de Cervantes', 'lastName': 'Cervantes', 'title': "Manager, Operations" }, { 'id': 4, 'fullName': 'Pacorro de Castel', 'lastName': 'Castel', 'title': "Security" }]; self.selectedId = 2; self.selectedUser = function() { return $filter('filter')(self.contacts, { id: self.selectedId })[0].lastName; }; });