Buttons and icons

As we could easily see, one of the most important things to do in order to de-uglify our components is applying the default Bootstrap classes to our <input type="button">, <input type="submit">, <button>, and <a> elements. Let's take the following template:

[...]<div *ngIf="questions.length == 0">    This quiz has no questions (yet):    click the <strong>Add a new Question</strong> button to add the first one!</div><input type="button"       value="Add a new Question"       (click)="onCreate()"       class="btn btn-sm btn-primary"        />

The above code is taken from the question-list.component.html template file: as we can see, we're using the btn-sm and btn-primary button classes here, as we want the button to be smaller than the Apply Changes and ...

Get ASP.NET Core 2 and Angular 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.