Giter Site home page Giter Site logo

Comments (16)

dmathieu avatar dmathieu commented on August 25, 2024

You need to load your templates before injecting the templates dependency.

from angular-rails-templates.

AlfonsoUceda avatar AlfonsoUceda commented on August 25, 2024

I have this in my application.js

//= require_tree ../templates

from angular-rails-templates.

dmathieu avatar dmathieu commented on August 25, 2024

Is that all you have? Aren't you initializing your app somewhere in that file?

from angular-rails-templates.

AlfonsoUceda avatar AlfonsoUceda commented on August 25, 2024

yes, I'm initializing my angular app:

imasd = angular.module 'imasdApp', [
'templates'
'ng-rails-csrf'
'ui.router'
'restangular'
'highcharts-ng'
'ui.bootstrap'
]

|config_block| (some functions, restangular, highcharts and locale)
|run_block|

from angular-rails-templates.

dmathieu avatar dmathieu commented on August 25, 2024

Try setting your file like this:

//= require_tree ../templates
//= require_self

from angular-rails-templates.

AlfonsoUceda avatar AlfonsoUceda commented on August 25, 2024

No work :S

//= require jquery
//= require lodash
//= require sugar
//= require sugar-locale_es
//= require angular
//= require angular-locale_es-es
//= require_tree ../templates
//= require_self
//= require ng-rails-csrf
//= require restangular
//= require angular-ui-router
//= require ui-bootstrap-tpls-0.10.0
//= require highcharts
//= require highcharts-ng
//= require imasd
//= require routes
//= require_tree ./controllers
//= require_tree ./directives
//= require_tree ./filters
//= require_tree ./services

from angular-rails-templates.

pitr avatar pitr commented on August 25, 2024

@AlfonsoUceda do you see your templates being included as JS files?

from angular-rails-templates.

randallb avatar randallb commented on August 25, 2024

I have the same problem, fwiw. Ended up not using it. I didn't see my templates being included as js files either.

from angular-rails-templates.

elado avatar elado commented on August 25, 2024

Same here. The JS are included but return 404.
v0.0.4 works so downgrading for now.

from angular-rails-templates.

elado avatar elado commented on August 25, 2024

The files included point to /javascripts/angular-ui-bootstrap/template/tabs/tab.js instead of /assets.

from angular-rails-templates.

pitr avatar pitr commented on August 25, 2024

I looked through v0.0.4...v0.0.5 and the only thing that can possibly cause this is if your config.assets.enabled is false.

from angular-rails-templates.

elado avatar elado commented on August 25, 2024

Turning on that flag in my application.rb solves the problem, however, a new Rails 4 app doesn't have this flag at all.

$ rails new test
$ cd test
$ rails c
> Rails.application.config.assets.enabled
=> nil

from angular-rails-templates.

pitr avatar pitr commented on August 25, 2024

oh shit!! I just yanked 0.0.5!

from angular-rails-templates.

dmathieu avatar dmathieu commented on August 25, 2024

I just merged @pitr's request. He should release 0.0.6 soon.
@elado @AlfonsoUceda: you can use the gem from git until we get a new release. Please let us know if anything is still broken 💙

from angular-rails-templates.

AlfonsoUceda avatar AlfonsoUceda commented on August 25, 2024

Hi!

Now master branch works perfectly. I'm waiting to release 0.0.6 for upgrade the gem ;)

Thanks

PD: Sorry, I forgot to say that I work with rails 4.1.0.beta1

from angular-rails-templates.

pitr avatar pitr commented on August 25, 2024

0.0.6 is has just been released. Thanks @AlfonsoUceda for trying out 0.0.5 and reporting the issue!

from angular-rails-templates.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.