sails.js - Ng-include doesnt work in Sails Js -


i have problem ng-include. in layout.ejs have de html ng-app code: homepage.ejs:

<div class="slide">         <div class="container" ng-controller="slide">             <h1 class ="main-title"> equipo mate </h1>             <ng-include src ="'partial.html"></ng-include>         </div>     </div> 

angular.js:

 angular.module('app',[])     .controller('slide', function($scope){     }); 

and partial.html, have "hello world"

this error: angular.js:12410get http://localhost:1337/partial.html 404 (not found)

somebody can me?

angularjs client side framework.

<ng-include src ="'partial.html"></ng-include> 

which means, line executed in browser
, angular tries http://localhost:1337/partial.html include in view.

now have ensure partial.html available @ (or public path).

you should put partial.html inside assets folder this.

ejs rendered on server side (in case).
angular rendered on client side.
should have clarity on when using both together.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -