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 8700767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:14:40+00:00 2026-06-13T02:14:40+00:00

I’ve builded a app with symfony2 the app expose an REST Api. now i

  • 0

I’ve builded a app with symfony2 the app expose an REST Api.

now i build a simple client for consuming

app.coffee -> app.js

App = Em.Application.create
    ready: ->
        @.entradas.load()
    Entrada: Em.Object.extend()
    entradas: Em.ArrayController.create
        content: []
        load: ->
            url = 'http://localhost/api/1/entrada'
            me = @
            $.ajax(
                url: url,
                method: 'GET',
                success: (data) ->
                    me.set('content', [])
                    for entrada in data.data.objects
                        me.pushObject DBPlus.Entrada.create(entrada)
            )

MyBundle:Home:index.html.twig

<script type="text/x-handlebars" src="{{ asset('js/templates/entradas.hbs') }}"></script>
<script src="{{ asset('js/libs/jquery-1.7.2.min.js') }}"></script>
<script src="{{ asset('js/libs/handlebars-1.0.0.beta.6.js') }}"></script>
<script src="{{ asset('js/libs/ember-1.0.pre.min.js') }}"></script>
<script src="{{ asset('js/app.js') }}"></script>

the problem here is when i run on dev enviroment and link the template like <script type="text/x-handlebars" src="{{...}}"> the app dont work, nothing show but works fine over prod enviroment.

he only way that works on dev enviroment is inline template

MyBundle:Home:index.html.twig

<script type="text/x-handlebars">
    {% raw %}
    <ul class="entradas">
      {{#each App.entradas}}
        <li class="entrada">{{nombre}}</li>
      {{/each}}
    </ul>
    {% endraw %}
</script>

config_dev.yml

Assetic Configuration

assetic:
    debug:          %kernel.debug%
    use_controller: false
    bundles:        [ ]
    #java: /usr/bin/java
    filters:
        cssrewrite: ~
        #closure:
        #    jar: %kernel.root_dir%/Resources/java/compiler.jar
        #yui_css:
        #    jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar

can explain why this behavoir?

Note: I disabled the debug profiler toolbar, and nothing

  • 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-13T02:14:42+00:00Added an answer on June 13, 2026 at 2:14 am

    with rake-pipeline, I wrote a AssetFile with the following code:

    output BUILD_DIR
    input SRC_DIR do
      match '**/*.handlebars' do
        handlebars :precompile => true
        concat 'template.js'
      end
    end
    

    and in my layout.html.twig include

    <script src="{{ asset('js/template.js') }}"></script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

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.