#angular2:angular2 example
Basic example illustrating *ng-for in angular2.
Main library: angular2:angular2
Main element: NgFor
Gist: https://gist.github.com/kasperpeulen/1779cb03472912a1359e
<canvas id="myCanvas" width="500" height="500"></canvas> |
String test = "print(print(as<caret>df),sadfsd,asdf)"; | |
String test2 = "print(print(asdf),sadfsd,as<caret>df)"; | |
String test3 = "print(print(asdf),sadfsd,asdf); int a = 3<caret>;"; | |
String test4 = "if (1 + 1 <caret> == 2)"; | |
String test5 = "asdf"; | |
void main() { | |
print(parameterInfo(test,test.lastIndexOf("<caret>"))); | |
print(parameterInfo(test2,test2.lastIndexOf("<caret>"))); | |
print(parameterInfo(test3,test3.lastIndexOf("<caret>"))); |
<button type="button" id="runbutton"> | |
<svg width="18" height="18" viewBox="0 0 24 24" style="vertical-align: text-bottom;"> | |
<path d="M8 5v14l11-7z"></path> | |
</svg> | |
Run | |
</button> | |
<button type="button" class="error" id="runbutton"> | |
<svg width="18" height="18" viewBox="0 0 24 24" style="vertical-align: text-bottom;"> | |
<path d="M8 5v14l11-7z"></path> |
<button type="button" id="runbutton"> | |
<svg width="18" height="18" viewBox="0 0 24 24" style="vertical-align: text-bottom;"> | |
<path d="M8 5v14l11-7z"></path> | |
</svg> | |
Run | |
</button> | |
<button type="button" id="runbutton"> | |
<svg width="18" height="18" viewBox="0 0 24 24" style="vertical-align: text-bottom;"> | |
<path fill="#4CAF50" d="M8 5v14l11-7z"></path> |
import 'dart:async' show Future; | |
/// This method answers the ultimate question. | |
Future doAwesomeThing() => new Future.value(42); | |
main() async { | |
var result = await doAwesomeThing(); | |
print(result); | |
} |
#angular2:angular2 example
Basic example illustrating *ng-for in angular2.
Main library: angular2:angular2
Main element: NgFor
Gist: https://gist.github.com/kasperpeulen/1779cb03472912a1359e
#angular2:angular2 example
An example illustrating how to use [(ng-model)] to set up two way binding using an input element.
Main library: angular2:angular2
Main element: formDirectives
Gist: https://gist.github.com/kasperpeulen/8b288fc737b7069d04eb
#angular2:angular2 example
A basic example showing how to use the @Component annotation in angular2.
Main library: angular2:angular2
Main element: Component
Gist: https://gist.github.com/kasperpeulen/5a0e89c90c8a732aa744
#angular2:angular2 example
A basic example showing how to use *ng-if in angular2.
Main library: angular2:angular2
Main element: NgIf
Gist: https://gist.github.com/kasperpeulen/dd353c3d95b2da3dd74b
Tags: #ng-if