Skip to content

Instantly share code, notes, and snippets.

<section class="slide" ng-app>
<input type="text" ng-model="prenom" placeholder="Entre ton prénom içi">
<input type="text" ng-model="verbe" placeholder="et un verbe...">
<input type="text" ng-model="whatever" placeholder="pis n'importe quoi">
<hr>
<h2>{{prenom}} {{verbe}} {{whatever}} !!</h2>
</section>
<section class="slide" ng-app>
<input type="text" ng-model="prenom" placeholder="Entre ton prénom içi">
<input type="text" ng-model="verbe" placeholder="et un verbe...">
<input type="text" ng-model="whatever" placeholder="pis n'importe quoi">
<hr>
<h2>{{prenom}} {{verbe}} {{whatever}} !!</h2>
</section>
<script src="js/angular-1.0.0rc10.min.js"></script>
<section ng-app>
<input type="text" ng-model="prenom" placeholder="Entre ton prénom içi">
<input type="text" ng-model="verbe" placeholder="et un verbe...">
<input type="text" ng-model="whatever" placeholder="pis n'importe quoi">
<hr>
<h2>{{prenom}} {{verbe}} {{whatever}} !!</h2>
</section>
@bchhun
bchhun / angular.html
Created June 11, 2012 10:47
Exemple Hello World
<script src="js/angular-1.0.0rc10.min.js"></script>
<section ng-app>
<h1>Allo <span>{{prenom || 'toi'}}</span> !</h1>
<form>
<input ng-model="prenom" type="text" name="prenom">
</form>
</section>
@bchhun
bchhun / simple-twitter-timeline.html
Created June 27, 2012 12:25
Simple Twitter Timeline with AngularJS
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<title>Twitter widget</title>
@bchhun
bchhun / resource.js
Created August 8, 2012 21:00
AngularJS Resource example
// La couche qui communique avec les URLs REST
angular.module(
'taResource', ['ngResource']
).factory(
'tonDataAccess', function ($resource) {
var url = "/ton/url";
return $resource(
url, {}, { update: { method: 'PUT'} }
);
@bchhun
bchhun / bootstrap-tooltip.js
Created August 29, 2012 04:02
Dynamically add a class to Bootstrap's 'popover' container
/* ===========================================================
* bootstrap-tooltip.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame
* ===========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@bchhun
bchhun / gist:3894292
Created October 15, 2012 18:44
jQuery en mode débutant
$(document).ready(function(){
$("a.colorbox").colobox({});
$("#foo1").carouFredSel();
$("select.foo").change(function(){
// bla bla
});
@bchhun
bchhun / gist:3894296
Created October 15, 2012 18:44
jQuery en mode débutant
$(document).ready(function(){
$("a.colorbox").colobox({});
$("#foo1").carouFredSel();
$("select.foo").change(function(){
// bla bla
});