Last active
January 14, 2016 14:43
-
-
Save vinay13/663c3a9e35ad70b16f15 to your computer and use it in GitHub Desktop.
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 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