1

When i saw source code sample in meanjs, I can't find how to include file css in application. You can explain operation to manage and include css file. How do i can include file css seamlessly. Thank you !

Alexander Elgin
  • 6,796
  • 4
  • 40
  • 50
phan ngoc
  • 191
  • 3
  • 14

2 Answers2

1

You can create a css file inside public folder. i have my css file in styles folder inside public.Inside app/views/layout.server.view.html you have to load your css file like this

<link rel="stylesheet" href="styles/main.css">
Mariya James
  • 935
  • 2
  • 9
  • 27
  • Thank you but maybe i don't explain cleary , because method you point is brute way, i need to know operate automatically , standard method in meanjs, not manual method . – phan ngoc Dec 02 '15 at 03:57
  • Then you can define it inside all.js and you can see asstes/css there you can define it – Mariya James Dec 02 '15 at 04:09
1

In your server make the folder 'public' ( which includes your css files) to public by adding:

app.use(express.static(path.join(__dirname, 'public')));
GroundIns
  • 541
  • 1
  • 5
  • 11