• This project
    • Loading...
  • Sign in

홍길동 / onos

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • onos
  • ..
  • js
  • ch03-controller.js
  • Simon Hunt's avatar
    GUI - Angular:: added angular-mocks.js to tp lib. · 449630f0 ...
    449630f0
    - sample code plus sample unit test, and karma configuration file.
    
    Change-Id: I0c5d867913c88e12eacd17934c6f42226b82410f
    Simon Hunt authored 2014-12-09 11:40:00 -0800
ch03-controller.js 433 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// Simple controller

angular.module('notesApp', [])
    .controller('ListCtrl', [function () {
        var self = this;
        self.items = [
            {id: 1, label: 'First', done: true},
            {id: 2, label: 'Second', done: false}
        ];

        self.getDoneClass = function (item) {
            return {
                finished: item.done,
                unfinished: !item.done
            };
        };
    }]);