In my application rails with angular, i create directory /app/assets/javascripts/angular/templates to create my views.
My route.js.coffe
app.config ($routeProvider) ->
$routeProvider
.when('/task', {
templateUrl: 'templates/task/index.html'
controller: 'TaskCtrl'
})
My index.slim
.container
h2
|What would you like to do?
a href="#/watchlist"
| Watchlist
|   or  
a href="#/task"
| Task
div class="row" ng-view=""
When i click the link "Task" nothing happens. I see the following message on the console:
Started GET "/templates/task/index.html" for 192.168.1.106 at 2014-08-29 08:49:17 -0300 ActionController::RoutingError (No route matches [GET] "/templates/task/index.html"):
My index.html:
<div ng-controller="TaskCtrl">
<h2>teste</h2>
</div>
and my route.rb
Rails.application.routes.draw do
get 'home/index'
scope :api, defaults: {format: :json} do
resources :tasks
resources :stocks
end
root 'home#index'
end