Hi,

I am trying to implement user profile, using embedded javascript object and 
populating it to the app. 

*I have this in my index.html head:*
*<script type="text/javascript">*
*var activeProfile = {*
*        name: "user",*
*        role: "admin",*
*        email: "[email protected]"*
*        };*
*</script>*


*Then:*
*app.config(['$provide', function($provide) {*




*        var profile = angular.copy(window.activeProfile);        
$provide.constant('activeProfile', profile);}]);And in my 
controller:angular.module('app.controllers', [])    
.controller('AppController', ['$scope','activeProfile', function($scope, 
activeProfile) {        $scope.profile = activeProfile;    }]);How to test 
this kind of controller?Regards*

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to