Tested under webpack-dev-server 1.7.0.
- Clone this gist
npm install
npm start
- Visit http://localhost:8080 (or http://192.168.x.x:8080) on multiple devices
- Edit entry.js and hit save
// jQuery based patch for onorientationchange | |
(function () { | |
var w = window.innerWidth, h = window.innerHeight, el = $('body')[0]; | |
if (!('onorientationchange' in el)) { | |
if (el.setAttribute) { | |
el.setAttribute('onorientationchange', 'return;'); | |
if (!typeof element[eventName] == 'function') { | |
// patch support for the onorientationchange event via onresize | |
$(window).resize(function () { |
myApp.directive('ngFocus', function( $timeout ) { | |
return function( scope, elem, attrs ) { | |
scope.$watch(attrs.ngFocus, function( newval ) { | |
if ( newval ) { | |
$timeout(function() { | |
elem[0].focus(); | |
}, 0, false); | |
} | |
}); | |
}; |
Tested under webpack-dev-server 1.7.0.
npm install
npm start
var demoApp = angular.module('demoApp', ['ngResource'], function($locationProvider) { | |
$locationProvider.hashPrefix(''); | |
}); | |
function MainCtrl($scope, Serv) { | |
$scope.selectedItem = { | |
value: 0, | |
label: '' | |
}; | |
$scope.Wrapper = Serv; |
Following the AngularJS PARIS meetup (25/2 à 19h à Paris with @sampaccoud @dzen @_kemar @tchack13 @vinz et @revolunet)
Here's our best AngularJS ressources : twitter, github, articles & blogs. Please comment and add your good stuff !
Everyone who's reading this, please leave your opinion/ideas/proposals as a comment for a better world!
Most of you guys read Josh' proposals to make components more reusable, I think. Now, reading through this proposals definitely gives a feeling that this is the right way. Anyways, If you haven't read it yet, you should.
So Josh shows us, how angular apps can be structured in a better and more reusable way. Reusability is a very important thing when it comes to software development. Actually the whole angularjs library follows a philosophy of reusability. Which is why you able to make things like:
Components are not "helper" methods, they are the best change in Angular 1.x since I've been using it.
What is the role of
.component()
?
template
or templateUrl
public class ImportedFilePathResolver : IPathResolver | |
{ | |
private string currentFileDirectory; | |
private string currentFilePath; | |
/// <summary> | |
/// Initializes a new instance of the <see cref="ImportedFilePathResolver"/> class. | |
/// </summary> | |
/// <param name="currentFilePath">The path to the currently processed file.</param> | |
public ImportedFilePathResolver(string currentFilePath) |
(function () { | |
'use strict'; | |
var clientKey = "XXXXXXXXXXXXXX"; | |
var clientSecret = "XXXXXXXXXXXX"; | |
var oauthToken; | |
var oauthSecret; | |
var userId; | |
var loginUrl; | |
var applicationName; |