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('app', []); |
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
import { Component, bundle } from 'ng-forward'; | |
import { ComponentA } from './component-a'; | |
import { ComponentB } from './component-b'; | |
@Component({ | |
selector: 'app', | |
directives: [ ComponentA, ComponentB ] | |
}) | |
export class App { } |
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
export function mockDirective(...names) { | |
return angular.mock.module(($compileProvider) => { | |
names.forEach((name) => { | |
$compileProvider.directive(name, () => { | |
return { | |
priority: 9999, | |
terminal: true, | |
restrict: 'EAC', | |
template:`<mock-${dashCase(name)}></mock-${dashCase(name)}>`, | |
replace: true |
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
;(function($){ | |
var alreadySupported = 'placeholder' in document.createElement('input'); | |
function doPlaceholder(){ | |
if(alreadySupported) return; | |
var $this = $(this); | |
if($this.data('placeholder-polyfill'))return; | |
$this.data('placeholder-polyfill', true); | |
if(!$this.is('[type="text"], [type="password"], [type="email"], textarea')) return; | |
$this.wrap('<span style="position:relative" />'); |
NewerOlder