Login / Join
Angular 2 Simple App
submitted on 26/08/2015 by
Codicode
+ infos
Config
Embed
Share
Angular 2 Simple App
by
Codicode
Angular 2 Simple App
Framework 1 :
-- None --
jQuery 2.0.3
jQuery 1.9.1
jQuery 1.9.0
jQuery 1.8.0
jQuery 1.7.1
jQuery 1.6.3
jQuery UI 1.10.3
MooTools 1.4.5
AngularJS 1.0.4
Prototype 1.7.1.0
Dojo 1.8.3
Chrome Frame 1.0.3
Ext Core 3.1.0
SWFObject 2.2
WebFont Loader 1.1.2
Framework 2 :
-- None --
jQuery 2.0.3
jQuery 1.9.1
jQuery 1.9.0
jQuery 1.8.0
jQuery 1.7.1
jQuery 1.6.3
jQuery UI 1.10.3
MooTools 1.4.5
AngularJS 1.0.4
Prototype 1.7.1.0
Dojo 1.8.3
Chrome Frame 1.0.3
Ext Core 3.1.0
SWFObject 2.2
WebFont Loader 1.1.2
+ Js file(s) :
https://cdnjs.cloudflare.com/ajax/libs/angular.js/2.0.0-alpha.34/angular2.sfx.dev.js
+ Css file(s) :
Apply
Link :
Direct http link :
Fork button :
Html code :
Embed preview :
Copy the following html code to your page to embed the preview,
To include many previews on a single page, just repeat the first line.
You can change the width, height and border color (bcolor).
<div class="refork-widget" code="43c" style="width:100%;height:200px;" bcolor="#ccc"></div>
<script type="text/javascript" src="//snippet.run/d/z.js"></script>
HTML
<my-app></my-app>
CSS
body{ background-color:#fff; margin : 20px; text-align:center; } .card{ background-color:red; color:#fff; width:200px; margin: 5px auto; padding: 5px; }
Javascript
var myCard = ng.Component({ selector: 'card', properties: ['name'], }) .View({ template: '<div class="card">Hello {{ name }} (myCard)</div>' }) .Class({ constructor: function(){} }); var myApp = ng.Component({ selector: 'my-app' }) .View({ template: ` <h1>Hello Dear Visitor (myApp)</h1> <card name="Name 1"></card> <card name="Name 2"></card> <card name="Name 3"></card>`, directives: [myCard] }) .Class({ constructor: function(){} }); ng.bootstrap(myApp);
©2013 Copyright snippet.run
Privacy
-
Terms of use
-
About
-
Contact