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> | |
<title>Angular Upgrade 1.0</title> | |
<style> | |
user { | |
background-color: lightyellow; | |
border: 2px solid darkorange; | |
display: inline-block; | |
width: 150px; | |
padding: 1em; |
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
var oldModelValue, newModelValue, counter; | |
function watchModelFn(scope) { | |
newModelValue = ngModelGet(scope); | |
if ( | |
!updatingFromTheView && | |
!(newModelValue === undefined && $valid === false) && | |
!modelEquals(newModelValue, oldModelValue) | |
) { |
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
[ 'angular2/annotations : module', | |
'angular2/annotations/ComponentAnnotation.changeDetection : member', | |
'angular2/annotations/ComponentAnnotation.viewInjector : member', | |
'angular2/annotations/ComponentAnnotation.constructor : member', | |
'angular2/annotations/ComponentAnnotation : class', | |
'angular2/annotations/DirectiveAnnotation.selector : member', | |
'angular2/annotations/DirectiveAnnotation.properties : member', | |
'angular2/annotations/DirectiveAnnotation.events : member', | |
'angular2/annotations/DirectiveAnnotation.host : member', | |
'angular2/annotations/DirectiveAnnotation.lifecycle : member', |
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
// Type definitions for Angular v2.0.0-local_sha.7dc1dff | |
// Project: http://angular.io/ | |
// Definitions by: angular team <https://github.com/angular/> | |
// Definitions: https://github.com/borisyankov/DefinitelyTyped | |
// *********************************************************** | |
// This file is generated by the Angular build process. | |
// Please do not create manual edits or send pull requests | |
// modifying this file. | |
// *********************************************************** |
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> | |
<body> | |
<template id='my-component-template'> | |
<style> | |
@import url('whatever...'); | |
</style> | |
</template> |
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
index.html | |
<div ng-include="templateUrl"></div> | |
template1.html | |
<h1>Hello</h1> |
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
'use strict'; | |
var app = angular.module('myApp', [ | |
'ngRoute' | |
]); | |
app.run(function ($rootScope, $location) { | |
var myArray = []; | |
for (var i = 0; i < 500; i++) { |
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
angular.module('resources', []) | |
// So we create a new service for each configuration of $http that we want | |
.factory('myServerAPI', function($http) { | |
function customRequestTransform(value) { ... } | |
function customResponseTransform(value) { ... } | |
// Provide a configuration object that corresponds to our specific $http needs |
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
/** | |
* @license AngularJS v1.3.2-local+sha.91834bc | |
* (c) 2010-2014 Google, Inc. http://angularjs.org | |
* License: MIT | |
*/ | |
(function(window, angular, undefined) {'use strict'; | |
/** | |
* @ngdoc module | |
* @name ngRoute |
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> | |
<title></title> | |
<script> | |
var e = document.createElement("base"); | |
e.setAttribute("href",location.pathname); | |
console.log(location.pathname); | |
document.head.appendChild(e); | |
</script> |