i making web app front-end in angular , back-end in rails. supposed use views in angular couldn't on views landing_page
, sign_up
, , log_in
pages because need use devise.
home.html.erb landing page user being directed when first come web app. when click contact
on nav bar, starts rendering angular view , shows since contact
view made of angular. logic rendering in application_controller
below:
def home if current_user render :file => 'public/index.html', :layout => false , return else if request.url == "#{request.base_url}/contact" render :file => 'public/index.html', :layout => false , return else render :file => '/pages/home.html.erb' end end end
route.rb set up:
root 'application#home'
if user not logged in , click contact
view, renders index.html
angular view. , angular routes /contact/
, shows appropriate view.
contact.html following:
<header class="page-header"> <div class="page-inner"> <a href="/" class="page-header-logo"><img src="/assets/logo-green.svg" alt="logo"></a> </div> </header> <body> //the view <body>
when user clicks logo in contact
view, goes landing_page
, starts killing css in home.html.erb. of css not correctly loaded , end changing fonts , fonts color. why happening?