|
3 | 3 | <head>
|
4 | 4 | <link rel="stylesheet" type="text/css" href="buzz.css"/>
|
5 | 5 | <script type="text/javascript">
|
| 6 | + var log = []; |
6 | 7 | function time(timerName){
|
7 | 8 | var started = new Date().getTime();
|
8 | 9 | return {
|
|
15 | 16 | var lapDuration = this.lapped - this.lastLap.time;
|
16 | 17 | var lastName = this.lastLap.name;
|
17 | 18 | this.lastLap = {duration:lapDuration, name:lapName, time:this.lapped};
|
18 |
| - console.log(timerName, lapName + ': ' + this.lastLap.duration + ' ms.', '(' + totalDuration + ' ms.)'); |
| 19 | + log.push(timerName + ' ' + lapName + ': ' + this.lastLap.duration + ' ms. (' + totalDuration + ' ms.)'); |
19 | 20 | }
|
20 | 21 | };
|
21 | 22 | }
|
|
24 | 25 | <script type="text/javascript" src="../angular-minified.js" ng:autobind ng:css="css/angular.css"></script>
|
25 | 26 | <script type="text/javascript">
|
26 | 27 | window.browser.lap('parse <angular/>');
|
27 |
| - function onInit() { |
| 28 | + function onInit(scope) { |
28 | 29 | window.browser.lap('compile DOM');
|
29 | 30 | window.setTimeout(function(){
|
30 | 31 | window.browser.lap('DOM render');
|
| 32 | + scope.$eval(); |
31 | 33 | }, 1);
|
32 | 34 | }
|
33 | 35 | </script>
|
|
39 | 41 | window.browser.lap('parse model');
|
40 | 42 | </script>
|
41 | 43 | </head>
|
42 |
| - <body ng:init="$window.$scope = this;$window.onInit(); activities = $window.googlebuzz" style="display:none;" ng:show="true"> |
43 |
| - <a href="{{$location.href}}">reload</a> |
| 44 | + <body ng:init="$window.$scope = this;$window.onInit(this); activities = $window.googlebuzz; log = $window.log" style="display:none;" ng:show="true"> |
| 45 | + <a href="{{$location.href}}">reload</a><br/> |
| 46 | + <tt ng:repeat="line in log">{{line}}<br/></tt> |
44 | 47 | <hr/>
|
45 | 48 | <div>
|
46 | 49 | <span><angular/> Buzz</span>
|
|
0 commit comments