title: Load and .html (wall posts) to different pages (so I can have wall posts in all the pages i want to add them) ,using angular
body: <p>I'm started with  angular yesterday and I want to have an .html with some behaviour in a separate file and add it to other ones. For instance and I want to have the wall posts in one .html, and I want to be able to add that wall posts to any page I want in a particular tag. I used a little of jquery.. So what I have done is this (but the digest doesn't seem to be working or something):</p>
  
  <p>This is the  html I want to add (I test it alone and it works):</p>
  
  <pre><code>&lt;div ng-app="" ng-controller="customersController"&gt; 
  
  &lt;ul&gt;
    &lt;li ng-repeat="x in names"&gt;
       &lt;b&gt; {{ x.texto }}&lt;/b&gt; {{x.id }}
    &lt;/li&gt;
  &lt;/ul&gt;
  &lt;input type="text" ng-model="tbPost"&gt;
  &lt;button ng-click="publicarPost()"&gt;Click Me!&lt;/button&gt;
  &lt;/div&gt;
  
  &lt;script&gt;
  
  
  function customersController($scope,$http) {
  
       $http.post(urlSitio + url , {id_partido : 1}).
          success(
             function(data, status, headers, config) {
             $scope.names = data.consulta;
             $scope.$digest();
          }).
          error(errorCallback);
  
  }
  
  
  &lt;/script&gt;
  </code></pre>
  
  <p>this is how I add it to a a tag in other page</p>
  
  <pre><code>// the function that load the .html
  function cargarControl(url,tag){
     $.get(urlControl+url, {},
          function(content) {
              $("#"+tag).append(content);
          }, 'html');
  }
  // calling that function
  cargarControl("wallPartido", "divPosts");
  angular.element('customersController').scope().$digest();
  </code></pre>
  
  <p>And it doesnt work, the page  shows  {{ x.texto}} {{x.id}} instead of the posts...
  I also tried $digest(); but doesnt work either.  How can I make it work? If this can't be done in this way, is there another one? (Actually I would like one without jquery)</p>
  
  <p>EDIT: What I want to achieve is having one html file with some behaviour (like a control in .net) and be able to embed it to a particular tag in any other page I want. For instance if I have a page that brings all the wall posts, i want be able to easily embed it  to some tag in other pages. Think that you build a javascript calculator, and you don't want paste de code, but you want to call the .html that contains it to add it in other pages.</p>