mercredi 27 juillet 2016

How to use angularjs template inside php project based on Zend

I have php framework based on Zend library and I'd like to use angularjs script in phtml file but I have problem how to include template edytuj_row.phtml located in:

ProjectName->SourceFiles->application->admin->views->settings->edytuj.phtml

<div row-settings></div>

<script type="text/javascript">
    var app = angular.module('mainApp', []);

    app.directive('rowSettings', function(){
        return {
            templateUrl: 'edytuj_row.phtml'            
        };
    });
</script>

to show I use:

Both files edytuj_row.phtml and edytuj.phtml are localizated in the same directory but edytuj_row.phtml is not seen. What is right path in templateUrl ? In this situation in place of <div row-settings></div> is loaded recurently main web page instead of template.

Aucun commentaire:

Enregistrer un commentaire