Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8622407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:02:50+00:00 2026-06-12T07:02:50+00:00

How do I stop Smarty throwing an error when I’m using AngularJS in the

  • 0

How do I stop Smarty throwing an error when I’m using AngularJS in the same template. I have a Smarty page template with this code:

 <li ng-repeat="i in items">
      <p class="item">{{i}}</p>
 </li>

And I’m getting a blank page when I view in a browser. I get a big error in my apache error_log, which contains the following:

 PHP Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template ... <p>{{i}}</p>; unknown tag "i

If I swap {{i}} for {{4}} or any other digit it works fine. And I can use maths as well, {{8+2}} will show 10 in the page. Is that the Smarty doing the maths of the angularJS?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T07:02:51+00:00Added an answer on June 12, 2026 at 7:02 am

    Try this:

    <li ng-repeat="i in items">
        <p class="item">{literal}{{i}}{/literal}</p>
    </li>
    

    Quote from Smarty site…

    {literal} tags allow a block of data to be taken literally. This is
    typically used around Javascript or stylesheet blocks where {curly
    braces} would interfere with the template delimiter syntax. Anything
    within {literal}{/literal} tags is not interpreted, but displayed
    as-is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im using the following Smarty code: {foreach from=$entries key=i item=topic} {if $topic.topic_style == question}
Stop running this script? A script on this page is causing Internet Explorer to
How can i stop propagation for link? <script src=http://code.jquery.com/jquery.min.js></script> <script> $(function() { $(#g).click(function(event){ alert(Link
I'm trying to stop using the arrow keys in vim. But instead of setting
For some reason I can't get Smarty to stop caching templates, which is really
How stop the rotation and moving of the body? I do this: mBody.setAngularDamping(100); mBody.setLinearDamping(100);
Now this is a weird one We have a project where we are reading
Hi Anyway to stop people browsing the Drupal home page and redirect to my
I can't seem to find a way to stop the smarty variables from showing
Using MySQL, I have a number of queries that look like: SELECT * FROM

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.