This file contains hidden or 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
<link rel="import" href="../google-map/google-map.html"> | |
<link rel="import" href="../speech-mic/speech-mic.html"> | |
<link rel="import" href="../google-map/google-map-directions.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Text.RegularExpressions; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Web; | |
using System.Web.Cors; |
This file contains hidden or 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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
things: [ | |
{ id: 1, name: 'a' }, | |
{ id: 2, name: 'b' }, | |
{ id: 3, name: 'c' } | |
] |
This file contains hidden or 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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
selectedItem: null, | |
things: [ | |
{ name: 'a' }, | |
{ name: 'b' }, | |
{ name: 'c' } | |
], |
This file contains hidden or 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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
actions: { | |
amountChanged() { | |
const expense = this.get(this, 'expense'); | |
//this.sendAction('update', expense); <-- Typo? Should be 'ammountChanged' instead of 'update' | |
// Everything works in the twiddle, but I think the names were changed in the article. | |
// The first argument to sendAction should be the name of the action |
This file contains hidden or 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 Controller { | |
$scope: ng.IScope; | |
$timeout: ng.ITimeoutService; | |
MyService: MyService; | |
static $inject = [ | |
'$scope', | |
'$timeout', | |
'MyService' |
This file contains hidden or 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 Controller { | |
$element: ng.IAugmentedJQuery; | |
$scope: ng.IScope; | |
$timeout: ng.ITimeoutService; | |
MyService: MyService; | |
static $inject = [ | |
'$scope', | |
'$element', | |
'$attrs', |
This file contains hidden or 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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
didRender() { | |
if(this.validateAttributes()) { | |
this.embed(this.$()); | |
} | |
}, | |
This file contains hidden or 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 Ember from 'ember'; | |
const { | |
observer | |
} = Ember; | |
export default Ember.Component.extend({ | |
thing: null, | |
optionsObserver: observer('thing.{prop3}', function () { |
This file contains hidden or 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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
filterPaneEnabled: false, | |
filterPaneEnabled2: false, | |
actions: { | |
form2submitted() { | |
console.log('form 2 submitted'); |