1

I am trying to implement the angularjs on a project that was used Smarty (PHP Template Engine).

The first problem I found was the problem in the template rendering, due to angularjs tag use braces ({) and the smarty variables.

I managed to solve this first problem by following this article: http://www.smarty.net/forums/viewtopic.php?p=87895&sid=937f958d431612d078f0f42324e09c59

Now the page is being rendered, but angularjs is not working.

If anyone has any tips and be able to help me, I'm grateful.

enter image description here

Sincerely, Renan Porto.

1
  • Part of the reason for using Angular is the fact it takes templates and renders them client side. I would suggest having a simple .html page and then loading the data in as needed, the answer @rkalita gave should work though. Commented Jan 21, 2016 at 16:48

2 Answers 2

3

You can change start and end interpolation symbol using interpolateProvider service.

you can change {{var}} to [[var]] or any symbols.

angular.module('app', [])
 .config(function($interpolateProvider){
    $interpolateProvider.startSymbol('[[').endSymbol(']]');
 });
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your help!
1

Here's how was the working code:

https://i.sstatic.net/cbyc2.png

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.