8484} ( MCU . Directives = MCU . Directives || { } ) ) ;
8585( function ( Controllers , undefined )
8686{
87- MCU . Modules . MCU . controller ( "PhasesCtrl" , [ '$scope' , 'phasesService' , function ( $scope , phasesService )
87+ MCU . Modules . MCU . controller ( "PhasesCtrl" , [ '$scope' , 'phasesService' ,
88+ function ( $scope , phasesService )
8889 {
89- /* var promise = phasesService.getPhases();
90+ var promise = phasesService . getPhases ( ) ;
9091 promise . then ( function ( data )
9192 {
92- $scope.phases = data;
93+ $scope . phases = data . data . MCU . Phases ;
9394 console . log ( $scope . phases ) ;
94- })*/
95+ } )
9596 } ] ) ;
9697} ( MCU . Controllers = MCU . Controllers || { } ) ) ;
9798( function ( Directives , undefined )
100101 {
101102 return {
102103 restrict : 'E' ,
103- link : function ( scope , elm , attrs )
104- {
105-
106- }
104+ controller : 'PhasesCtrl' ,
105+ templateUrl : MCU . PartialsPath + "/phases.html"
107106 }
108107 } ] ) ;
109108} ( MCU . Directives = MCU . Directives || { } ) ) ;
110109( function ( Service , undefined )
111110{
112- MCU . Modules . MCU . service ( "phasesService" , [ '$http' , '$q' , function ( $http , $q )
111+ MCU . Modules . MCU . service ( "phasesService" , [ '$http' , '$q' , function ( $http , $q )
113112 {
114- /* var deferred = $q.defer();
113+ var deferred = $q . defer ( ) ;
115114
116115 $http . get ( 'resources/json/marvel_movies.json' ) . then ( function ( data )
117116 {
118117 deferred . resolve ( data ) ;
119118 } ) ;
120-
121119 this . getPhases = function ( )
122120 {
123121 return deferred . promise ;
124- }*/
122+ }
125123 } ] ) ;
126124} ( MCU . Service = MCU . Service || { } ) ) ;
0 commit comments