Le 04/03/2014 20:28, Billy Figueroa a écrit :
>
> Hello, I have an issue when trying to call a function from a php
> template file that is being loaded via ng-view. This is only a problem
> inside the ng-view directive. If I make a function call from the
> main/shell page then it executes properly but if I make the same call
> from a template file being loaded with ng-view it does not work.
>
This is not related to AngularJS.
You have to understand how php and javascript are working: php scripts
are interpreted on the server side, when a php file is requested.
Javascript is interpreted on the client side.
So the template loaded by AngularJS can't be interpreted on the client side.

Your FiddelJS can't work, because a php script doesn't work in a html
file, neither in a css file...

This is not an issue nor a limitation.

If you need to use php scripts, take a look at
http://docs.angularjs.org/api/ng/service/$http. You can implement an
AngularJS service that is requesting php scripts and use this service in
your javascript code.

-- 
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/groups/opt_out.

Reply via email to