dir.by  
  Поиск  
Компьютер, программы
Angular
 Что такое Angular 8? 
посмотрели 5610 раз
обновлено: 3 Augusta 2020
Angular представляет фреймворк от компании Google для создания клиентских приложений. Прежде всего он нацелен на разработку SPA приложений (Single Page Application), то есть одностраничных приложений.

Angular является продолжением фреймворка AngularJS.

Angular предоставляет такую функциональность, как двустороннее связывание, позволяющее динамически изменять данные в одном месте интерфейса при изменении данных модели в другом, шаблоны, маршрутизация и так далее.

Одной из ключевых особенностей Angular является то, что он использует в качестве языка программирования TypeScript.

Но мы не ограничены языком TypeScript. При желании можем писать приложения на Angular с помощью таких языков как Dart или JavaScript.
Однако TypeScript все таки является основным языком для Angular.

Последняя версия это Angular 10 вышла в июне 2020 года.
----------------
  json     tsconfig.json
{
     "compilerOptions": {
          "target": "es5",
          "module": "es2015",
          "moduleResolution": "node",
          "sourceMap": true,
          "emitDecoratorMetadata": true,
          "experimentalDecorators": true,
          "lib": [ "es2015", "dom" ],
          "noImplicitAny": true,
          "suppressImplicitAnyIndexErrors": true,
          "typeRoots": [
               "node_modules/@types/"
          ]
     },
     "include": [
          "src/**/*.d.ts"
     ],
     "exclude": [
          "node_modules"
     ]
}
  JavaScript     webpack.config.js
const path = require('path');
const webpack = require('webpack');

module.exports = {
     entry: {
          'app': './src/main.ts'
},
     mode: 'production',
     output: {
          path: __dirname + '/build',
          filename: 'transformed.js'
},
resolve: {
          extensions: ['.ts', '.js']
},
module: {
          rules: [
               {
                    test: /\.ts$/,
                    use: [
                         {
                              loader: 'awesome-typescript-loader',
                              options:
                              {
                                   configFileName: __dirname + '/tsconfig.json'
                              }
                         },
                         'angular2-template-loader'
                    ]
               }
          ]
     },
     plugins: [
          new webpack.ContextReplacementPlugin(
               /angular(\\|\/)core/,
               path.resolve(__dirname, 'src'),
               {}
          )
     ]
}
 
 
Next topic →
Creating a new web application with Angular 8. Using the command line: npx -p @angular/cli@8.1.0 ng new
 
Your feedback ... Comments ...
   
Your Name
Your comment (www links can only be added by a logged-in user)

  Объявления  
  Объявления  
 
What is Angular 8?
New Angular 8 application
Option 1. Creating a new Angular application from the console with the angular/cli command (50 files)
Creating a new web application with Angular 8. Using the command line: npx -p @angular/cli@8.1.0 ng new
Option 2 (the best for me). Creating a new Angular application yourself (8 files)
Create a new web application with Angular 8 in Visual Studio Code. We use: Node.js + Angular (write our component in ts file) + Typescript (convert files ts to js)
What happens when I start an Angular 8 application? Run main.ts file. Creating a module.
Angular 9
Creating a new web application with Angular 9 in Visual Studio Code. Use: Node.js + Angular (write our component in the ts file) + Typescript (convert ts files to js)
Angular 12
Creating a new web application with Angular 12 in Visual Studio Code. Use: Node.js + Angular (write our component in the ts file) + Typescript (convert ts files to js)
Adding routing (router) to the web application with Angular 12
Angular Description
Modules in Angular
Components in Angular
Binding data in Angular
Errors
Error "npm : The term "npm" is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spell included, verify that the path is correct and try again. " | nodejs npm angular
Error "npm ERR! While resolving: @angular/flex-layout@12.0.0-beta.35 | Could not resolve dependency: | Conflicting peer dependency: @angular/cdk@12.2.13" | nodejs npm angular
ng serve Error "ng : The term "ng" is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spellin the path is correct and try again. " | nodejs npm angular
ng serve Error "File ng.ps1 cannot be loaded. The file ng.ps1 is the current system. " | nodejs npm angular
Error "Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js)" | nodejs npm angular
Docker for Angular
Using Docker in a project with Angular (for Windows)
Angular Flex-Layout
Angular Flex-Layout
WWW Sites to Learn Angular
Sites to learn Angular

  Ваши вопросы присылайте по почте: info@dir.by