WaterBoy WaterBoy - 24 days ago 11
AngularJS Question

How/where do you add css code in angularJS

I am trying to build a dialog using AngularMaterial and in the demo it has css code:

.dialogdemoBasicUsage #popupContainer {
position: relative;
}

.dialogdemoBasicUsage .footer {
width: 100%;
text-align: center;
margin-left: 20px;
}

.dialogdemoBasicUsage .footer, .dialogdemoBasicUsage .footer > code {
font-size: 0.8em;
margin-top: 50px;
}

.dialogdemoBasicUsage button {
width: 200px;
}

.dialogdemoBasicUsage div#status {
color: #c60008;
}

.dialogdemoBasicUsage .dialog-demo-prerendered md-checkbox {
margin-bottom: 0;
}


In my angularJS project - where do I put this code? do i create a new .css file and then reference it and do I have to put anything around it?

Answer

It is the same way how you do it in normal HTML application.

Add the css code to a file named style.css , refer it inside

<head>
  <title>To Do List</title>
  <link href="style.css" rel="stylesheet" />
</head>

DEMO