How to write path redirect in ruby on rails and angularjs -


sorry new ruby on rails.

i trying create directive in angularjs. doing create html file in folder view/forms, named topright-buttongroup.html

then created simple directive test:

app.directive('toprightbuttontools', function(){     return {         restrict: 'c',         templateurl: 'topright-buttongroup.html'     }; }); 

but getting error message in console is:

get http://localhost:3000/forms/topright-buttongroup.html 404 (not found)  

am missing should done on ruby on rails? or should write redirect code , save in somewhere?

my full folder structure is:

here structure

if need form accessible so, create folder inside public/ forms/ , have file placed there. content inside public dir rendered directly.

unlike core php or other such scripting languages, ror requires controllers render actions arent merely files interpreted. also, routes defined in config/routes.rb.

refer:

http://guides.rubyonrails.org/routing.html

http://www.xyzpub.com/en/ruby-on-rails/3.2/statische_webseiten.html


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -