jeudi 16 avril 2015

How to resolve a ng-model variable from angularJS in ejs template

I am using MEAN stack.

I have set my templating engine as 'ejs', and now when i try to attach an ng-model, it is not getting resolved in the ejs template.



Things tried till now:



  • tried using html template(and then used '{{' '}}'), but did not work

  • in ejs template used '<%=' '%>', with no result


Code for index.ejs is given below



<!DOCTYPE html>
<html>
<head>

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js"></script>

<title>HOME</title>
<link rel="stylesheet" href="/stylesheets/style.css">

</head>

<body>
<input ng-model="name"> Hello <%= name %>
</body>
</html>

Aucun commentaire:

Enregistrer un commentaire