Skip to content

Instantly share code, notes, and snippets.

var fs = require('fs'),
argv = require('yargs').argv,
tasks = fs.readdirSync('./gulp/tasks/');
require('./config');
// --release flag when executing a task
global.release = argv.release;
tasks.forEach(function (task) {
<!DOCTYPE html>
<html>
<head>
<title>Log</title>
</head>
<body>
<!-- Controller as syntax -->
<div data-ng-controller="MainController as main">
<!-- one way data binding -->
{{::main.test}}
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<title>Directives</title>
</head>
<body>
<div data-ng-controller="MainController">
<div data-my-dir>
<p> This is the HTML I want! <p>
</div>
'use strict';
angular.element(document).ready(function() {
angular.bootstrap(document, ['iwdif']);
});
function config($locationProvider, $urlRouterProvider, $logProvider) {
$locationProvider.hashPrefix('!');
$urlRouterProvider.otherwise('/');
$logProvider.debugEnabled(true);
#!/usr/bin/env node
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you 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
//
function provider(name, provider_) {
if (isFunction(provider_) || isArray(provider_)) {
provider_ = providerInjector.instantiate(provider_);
}
if (!provider_.$get) {
throw $injectorMinErr('pget', "Provider '{0}' must define $get factory method.", name);
}
return providerCache[name + providerSuffix] = provider_;
}
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<title>Directives</title>
</head>
<body>
<div ng-controller="ChildController as child">
<button type="button" ng-click="child.sayMe()">Say me!</button>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-rc.1/angular.min.js"></script>
<div ng-repeat="module in Modules">
<div class="leftColumn">
<span>{{module.UpTime.TotalTime}}</span>
<h2>{{module.ModuleName}}</h2>
</div>
<div class="rightColumn">
<span>{{module.UpTime.TotalTime}}</span>
<h2>{{module.ModuleName}}</h2>
</div>
</div>
var app = angular.module('myApp', []);
app.controller('MainController',function($scope) {
});
app.directive('my', function(){
return {
restrict: 'EA',
replace: true,
template: '<div>pippo</div>' ,
compile:function compile(tElement, tAttrs, transclude) {
var app = angular.module('myApp', []);
app.controller('MainController',function($scope) {
});
app.directive('my', function($compile){
return {
restrict: 'EA',
replace: true,
template: '<div>pippo</div>' ,
/*compile:function compile(tElement, tAttrs, transclude) {