а потом е***ься типо всё *100 а результат /100
let one = parseFloat("10.77") * 100,
two = parseFloat("5.89") * 100,
three = parseFloat("20.04") * 100,
view = document.getElementById("container");
let sum = (one + two + three) / 100;
console.log(sum)
view.innerHTML = sum.toFixed(2);
figure {
animation: imageAnimation 3s linear infinite 0s;
}
figure:nth-child(3) {
animation-delay: 2s;
}
BehaviorSubject
объекта есть метод getValue
this.cartService.cart.next(this.cartService.cart.getValue().push(prod));
ngOnInit(){
let addSanitizedUrl = (item) => {
item.sanitizedImageUrl = this.sanitizer.bypassSecurityTrustUrl('https://s27.postimg.org/' + this.image + item.image)
return item;
};
this.cartService.getCartItems().subscribe(
(data) => this.cartItems = data.map(addSanitizedUrl)
);
}
<span class="col cart__item--imageBox" [style.background-image.url]=cartItem.sanitizedImageUrl"></span>
if (this.authService.isLoggedIn()) { ... }
set loggedIn(val: boolean) {
if (typeof val == 'undefined') {
val = !!this.cookie.getObject('loggedIn');
} else {
this.cookie.putObject('loggedIn', val);
}
this._loggedIn = val;
}