P1284 Triangular Ranch

Portal. First, we need some junior high school mathematics knowledge – Qin Jiushao’s formula (also known as Helen’s formula): p = a + b + c 2 S = p ( p ? a ) ( p ? b ) ( p ? c ) \begin{align} & amp;p=\dfrac{a + b + c}{2}\ & amp;S=\sqrt{p(p-a)(p-b)(p-c)} \end{align} […]

The principle of two-way binding in vue, compared with angular

Table of Contents Preface Vue two-way binding usage code Vue’s two-way binding principle Angular two-way binding usage code Angular’s two-way binding principle understand Efficiency: Although the two-way binding principles of Vue and Angular are different, they are both committed to providing efficient data update mechanisms. However, since Vue uses data hijacking, its efficiency is usually […]

angular14 + NG-ZORRO form group

WelcomeModule.ts import { NgModule } from ‘@angular/core’; import { FormsModule } from “@angular/forms” import { WelcomeRoutingModule } from ‘./welcome-routing.module’; import { WelcomeComponent } from ‘./welcome.component’; import { NzFormModule } from ‘ng-zorro-antd/form’; import { NzInputModule } from ‘ng-zorro-antd/input’; import { NzIconModule } from ‘ng-zorro-antd/icon’; import { NzDatePickerModule } from ‘ng-zorro-antd/date-picker’; import { NzRadioModule } from ‘ng-zorro-antd/radio’; […]

Angular asynchronous data flow programming

1 Several common methods of asynchronous programming First give an example of an asynchronous request: import {<!– –>Injectable} from ‘@angular/core’; @Injectable({<!– –> providedIn: ‘root’ }) export class RequestServiceService {<!– –> constructor() {<!– –> } getData() {<!– –> setTimeout(() => {<!– –> let res = ‘zhaoshuai-lc’ return res }, 3000) } } import {<!– –>Component, OnInit} […]

Angular template syntax

1 Angular data text binding In Angular, {<!– –>{<!– –>}} is used to bind the data defined in the business logic. <div class=”title”> {<!– –>{<!– –>title}}</div> 2 Binding attributes in Angular template [title]=”student”Bind dynamic attributes ts: public title: string = ‘zhaoshuai-lc’ html: <div [title]=”student”> Zhang San </div> 3 Binding Html in Angular template ts: public […]

Angular implements paginator component

I am very grateful to angular for implementing a simple pagination component – Amor丶Diamond – Blog Park (cnblogs.com). I made modifications based on this blogger’s code and added jump and rows per page functions. Look at the picture first: // Configurable items // totalItem total number of data items // maxSize: the maximum number of […]

A Practical Guide to Search Engine Optimization (SEO) for Angular Apps

The author has previously published two articles on Angular development in the Nuggets community, respectively introducing the technical details of Angular’s support for server-side rendering and PWA: Front-end application State Transfer troubleshooting case for server-side rendering based on Angular Universal engine Sharing the development steps for Angular applications that support PWA (Progressive Web Application) features […]

Front-end application State Transfer troubleshooting case for server-side rendering based on Angular Universal engine

The author’s previous nugget article, a SAP development engineer’s 2022 year-end summary: Forty years old, mentioned that my current team is responsible for developing an e-commerce Storefront application based on the Angular framework. The Storefront is an open source Angular application based on Angular and Bootstrap and built for SAP Commerce Cloud. Figure 1: Spartacus […]

About the problem of Angular Universal application rendering twice

Angular Repository url: https://github.com/angular/angular-cli/issues/7477 Phenomenon: I built a sample repo using angular-cli and followed the steps in the Universal Rendering story to enable server side rendering. The application loads well on running, but I see the client rendering also happening after the page is served from the server. So the page gets rendered from the […]

The self-developed framework has entered the global JS framework list, ranking closely behind React and Angular!

Foreword An important goal was finally achieved! Strve, the JavaScript framework I developed independently, recently released a major version 6.0.2. It has been nearly two months since the last major version was released. During this period, a large number of optimizations were carried out, which greatly improved the performance and stability of the framework. In […]