Tutorial by Examples

app.js angular.module('myApp', ['ui.router']) .controller('controllerOne', function() { this.message = 'Hello world from Controller One!'; }) .controller('controllerTwo', function() { this.message = 'Hello world from Controller Two!'; }) .controller('controllerThree', funct...
app.js angular.module('myApp', ['ui.router']) .controller('controllerOne', function() { this.message = 'Hello world from Controller One!'; }) .controller('controllerTwo', function() { this.message = 'Hello world from Controller Two!'; }) .controller('controllerThree', funct...
app.js angular.module('myApp', ['ui.router']) .service('User', ['$http', function User ($http) { this.getProfile = function (id) { return $http.get(...) // method to load data from API }; }]) .controller('profileCtrl', ['profile', function profileCtrl (profile) { // i...
app.js var app = angular.module('myApp',['ui.router']); app.config(function($stateProvider,$urlRouterProvider) { $stateProvider .state('home', { url: '/home', templateUrl: 'home.html', controller: function($scope){ $scope.text = 'This is the ...

Page 1 of 1