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
<!-- work --> | |
<div class="wave" [style.height.px]="step.DoneItemCount/step.TotalItemCount*150"></div> | |
<!-- not work --> | |
<div class="wave" [ngStyle]="{height:step.DoneItemCount/step.TotalItemCount*150}"></div> |
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, ViewChild, AfterContentInit } from '@angular/core'; | |
import { TabComponent } from './tab.component'; | |
@Component({ | |
selector: 'my-app', | |
template: ` | |
<app-tab> | |
<div class="title" #title> | |
title! | |
</div> |
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
#!/usr/bin/env node | |
var fs = require('fs'); | |
var path = require('path'); | |
var jshint = require('jshint').JSHINT; | |
var async = require('async'); | |
var recursiveFolderSearch = true; | |
var foldersToProcess = [ | |
'js' | |
]; |
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('directive', []) | |
.directive('enterToTab', function () { | |
return { | |
restrict: 'A', | |
scope: { | |
afterEvent: '&afterEnter', | |
beforeEvent: '&keydown' | |
}, | |
link: function (scope, element, attrs) { | |
element.bind('keydown', function (event) { |
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 getTranslationProviders():Promise<CompilerOptions[]>{ | |
const locale = 'zh-TW'; | |
const PROVIDERS = [{provide: LOCALE_ID, useValue: locale}]; | |
return System.import(`raw-loader!./locale/messages.${locale}.xlf`) | |
.then( | |
(translations: string) => | |
[{provide: TRANSLATIONS, useValue: translations}, | |
{provide: TRANSLATIONS_FORMAT, useValue: 'xlf'}, | |
...PROVIDERS]) | |
.catch(() => PROVIDERS); // ignore if file not found |
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 create = Observable.create(observer => { | |
setTimeout(function () { | |
observer.next(3) | |
}, 100); | |
setTimeout(function () { | |
observer.next(4) | |
}, 200); | |
}); |
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
Private Function CheckCompanyExist(comp As String, mac As String) As Boolean | |
Dim result As Boolean | |
Dim ADOcn As New ADODB.Connection | |
Dim ADOrt As New ADODB.Recordset | |
Dim strCn As String | |
Dim strSQL As String | |
strCn = "Provider=SQLOLEDB;Server=eshclouds-license******;Database=License;Uid=******;Pwd=*****;" |
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
class Producer { | |
listeners = []; | |
constructor() { | |
} | |
addListener(listener) { | |
if(typeof listener === 'function') { | |
this.listeners.push(listener) | |
} else { |
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 f() { | |
console.log("f(): evaluated"); | |
return function (target, propertyKey: string, descriptor: PropertyDescriptor) { | |
console.log("f(): called"); | |
} | |
} | |
function g() { | |
console.log("g(): evaluated"); | |
return function (target, propertyKey: string, descriptor: PropertyDescriptor) { |
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 { Platform } from 'ionic-angular'; | |
import { InjectionToken, Injectable } from "@angular/core"; | |
export let APP_CONFIG = new InjectionToken<string>('apiConfig'); | |
export function APIConfig(plat: Platform) { | |
const _browser = '/api'; // reverse proxy | |
const _device = 'http://192.168.0.100/api'; | |
return plat.is('core') ? _browser : _device; |
OlderNewer