**Main.js**  for example

       <script>  
        
            var bosAppModule = angular.module("bosApp", []); 
            
            $http({
                 url: menu.templateUrl,
                  method: "GET"  
                 }).success(function(data, status) {
                  $scope.data = data;
                 jQuery("view-partial").html($compile($scope.data)($scope));
                  }).error(function(data, status) {
                   $scope.status = status;
                });
            bosAppModule.controller('Controller2', ['$scope', 
function($scope) {
                $scope.support = {
                  name: 'bagya',
                  address: 'bangalore'
                };   
            }]);    
        </script>
    Partial page
      <div  ng-controller="Controller2">
        <h1>Hello {{support.name}}</h1>
        </div>

If the controller code  main js file. Its working. If the controller code 
in partial page it's not working(above code). 

please look out below code and  help me to resolve this issue.

  example
This code in partial page it will call dynamically.

    <div  ng-controller="Controller2">
    <h1>Hello {{support.name}}</h1>
    </div>
    <script>
    bosAppModule.controller('Controller2', ['$scope', function($scope) {
        $scope.support = {
          name: 'bagya',
          address: 'bangalore'
        };   
    }]);
    </script>
Actually i need evey controller in that own partial page.

-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to