How to use Bootstrap loading buttons in Angular 2/4?

885 views
Skip to first unread message

Dhinakar Reddy Pothireddi

unread,
Aug 18, 2017, 5:31:17 AM8/18/17
to Angular and AngularJS discussion
I am new to Angular and trying to simulate this kind of action.

Thanks in advance.

Sander Elias

unread,
Aug 18, 2017, 11:03:15 AM8/18/17
to Angular and AngularJS discussion
Hi Dhinikar,

If you like, you can use that button. You can wrap the behaviour in a directive, so it's easier to use in Angular. in that case use elementRef.nativeelement to grab a reference to the DOM object, and then you can call the bootstrap function from.

Regards
Sander


Dhinakar Reddy Pothireddi

unread,
Aug 27, 2017, 12:52:49 PM8/27/17
to Angular and AngularJS discussion
Thanks Sander

Dhinakar Reddy Pothireddi

unread,
Aug 27, 2017, 12:54:22 PM8/27/17
to Angular and AngularJS discussion
I solved it this way


<button class="btn btn-info btn-md">
<i class="fa fa-spinner fa-spin" *ngIf="isValid"></i>
Loading
</button>
isValid = true;

Reply all
Reply to author
Forward
0 new messages