Dart for the Web
Ein sehr einfaches AngularDart Projekt . Es wurde mit Visual Studio Code erstellt und ist Grundlage, soweit nicht anders angegeben, für die Code Beispiele AngularDart betreffend.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:host { | |
/* This is equivalent of the 'body' selector of a page. */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:angular/angular.dart'; | |
import 'src/my_Component/my_Component.dart'; | |
// AngularDart info: https://webdev.dartlang.org/angular | |
// Components info: https://webdev.dartlang.org/components | |
@Component( | |
selector: 'my-app', | |
styleUrls: ['app_component.css'], | |
templateUrl: 'app_component.html', | |
directives: [my_Component], | |
) | |
class AppComponent { | |
// Nothing here yet. | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<my_Component></my_Component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:angular/angular.dart'; | |
@Component( | |
selector: 'my_Component', | |
template: '<h1>Hallo Liebe AngularDart Welt !!</h1>', | |
) | |
class my_Component { | |
} |
Update zu AngularDart 30.05.21
Google hat sich für eine Abkehr von AngularDart entschieden. Wie in diesem Artikel nachzulesen ist, empfiehlt man jetzt Flutter Web, oder Angular in Verbindung mit Typescript / JavaScript. Das ist zwar noch nicht das Ende von AngularDart. Aber ohne das starke Engagement von Google, ist die Entwicklung dieser Plattform höchst unsicher.
Der Schritt ist gewagt, da Flutter für das Web nach wie vor zum Teil stark kritisiert wird.
Hauptsächlich werden in diesem Zusammenhang mangelnde Geschwindigkeit und eingeschränkte Scroll Möglichkeiten angeführt. Man darf gespannt sein.
Hauptsächlich werden in diesem Zusammenhang mangelnde Geschwindigkeit und eingeschränkte Scroll Möglichkeiten angeführt. Man darf gespannt sein.
Dart web-simple Basis Projekt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="scaffolded-by" content="https://github.com/dart-lang/stagehand"> | |
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" | |
integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous"> | |
<title>dartweb1</title> | |
<link rel="stylesheet" href="styles.css"> | |
<link rel="icon" href="favicon.ico"> | |
<script defer src="main.dart.js"></script> | |
</head> | |
<body> | |
<div> | |
<h1 class="display-4" id="output"></h1> | |
</div> | |
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js" | |
integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf" | |
crossorigin="anonymous"></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:html'; | |
void main() { | |
querySelector('#output').text = 'Die Dart Anwendung funktioniert'; | |
} |
Kommentare
Kommentar veröffentlichen