Skip to content

Instantly share code, notes, and snippets.

@vinay13
Last active January 14, 2016 14:43
Show Gist options
  • Save vinay13/663c3a9e35ad70b16f15 to your computer and use it in GitHub Desktop.
Save vinay13/663c3a9e35ad70b16f15 to your computer and use it in GitHub Desktop.
var app=angular.module('app',[]);
app.config(function ($routeProvider){
$routeProvider
.when('/',{
templateUrl: 'app.html',
controller: 'AppCtrl'
})
});
app.controller('AppCtrl',function($scope,$q){
var defer = $q.defer();
defer.promise
.then(function(){
alert('I promised I would');
})
defer.resolve();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment