mardi 5 mai 2015

Angularjs Push does not work

I want to push an element in my html interface using angularjs, this element appears only when I refresh the url.

this is a portion of my html code :

   <nav class="navbar-default navbar-side" role="navigation"  ng-         controller="createController">
         <li ng-repeat="project in projects" id="proj" >
                <a  style="background: #AFAFAF"> <i ng-click="remove(project.id)" class="fa fa-fw fa-trash-o"></i>
                   {{project.name}}
                    <ul>

this is the push in my controllers:

        $scope.projects.push({"idProject": idp, "name": namep, 'path':  directory});

Aucun commentaire:

Enregistrer un commentaire