This repository was archived by the owner on Apr 11, 2019. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 "json-formatter" : " ~0.2.7" ,
2323 "lodash" : " ~3.10.1" ,
2424 "ng-clip" : " ~0.2.6" ,
25- "semantic" : " semantic-ui#~2.1.3"
25+ "semantic" : " semantic-ui#~2.1.3" ,
26+ "favico.js" : " ~0.3.10"
2627 },
2728 "resolutions" : {
2829 "jquery" : " ~2.1.4" ,
Original file line number Diff line number Diff line change 22 'use strict' ;
33
44 angular . module ( 'angularJsonapiExample' )
5- /* global _: false */
5+ /* global _: false, Favico: false */
66 . constant ( '_' , _ )
77 . constant ( 'apiURL' , 'http://localhost:3000' )
8- ;
8+ . constant ( 'Favico' , Favico ) ;
99} ) ( ) ;
Original file line number Diff line number Diff line change 22 'use strict' ;
33
44 angular . module ( 'angularJsonapiExample' )
5- . run ( logEvents ) ;
5+ . run ( logEvents )
6+ . run ( marioFavicon ) ;
67
78 function logEvents (
89 $rootScope ,
5051 } ) ;
5152 }
5253 }
54+
55+ function marioFavicon ( Favico , $interval ) {
56+ var favicon = new Favico ( {
57+ animation :'slide' ,
58+ position : 'up'
59+ } ) ;
60+ var up = new Image ( ) ;
61+ up . src = 'assets/images/mario-up.gif' ;
62+
63+ var down = new Image ( ) ;
64+ down . src = 'assets/images/mario-down.gif' ;
65+
66+ var isDown = true ;
67+
68+ $interval ( changeIcon , 10 ) ;
69+
70+ function changeIcon ( ) {
71+ isDown = ! isDown ;
72+ if ( isDown ) {
73+ favicon . image ( down ) ;
74+ } else {
75+ favicon . image ( up ) ;
76+ }
77+ }
78+ }
5379} ) ( ) ;
Original file line number Diff line number Diff line change 55 < title > angularJsonapi</ title >
66 < meta name ="description " content ="">
77 < meta name ="viewport " content ="initial-scale=1 ">
8+ < link rel ="shortcut icon " href ="favicon.gif " />
89 <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
910
1011 <!-- build:css({.tmp/serve,src}) styles/vendor.css -->
You can’t perform that action at this time.
0 commit comments