These are chat archives for filearts/plunker

10th
Jul 2016
ARNAB KUMAR ROY
@arnabkumarroy
Jul 10 2016 02:42
I got the solution.. Thanks
svendeva
@svendeva
Jul 10 2016 09:10
I cannot get *ngIf statements to work in plunker for angular 2 can anyone help?
SunilBabu4989
@SunilBabu4989
Jul 10 2016 10:00
Hi guys
Jhonatangiraldo
@Jhonatangiraldo
Jul 10 2016 15:13
@svendeva which is the problem ?
Hi guys. I need to pass a parameter to a page, that is the parent route of another child routes. But the parent route can't get the params passed, and the children routes if can get the params passed to parent, is so strange. Someone know some about it ?
himanshusaini27
@himanshusaini27
Jul 10 2016 17:00
hi i am himanshu i am new in angular 2
how to start with angular 2
Marc Freeman
@Dudecor3
Jul 10 2016 18:28

Hey guys, I'm having a bit of a hard time getting the $http service to work in Angular,
I wrote the following JavaScript for a controller called 'ServicesCtrl':

var app = angular.module("computer", ['ngRoute',])

.config(['$routeProvider', function($routeProvider){
$routeProvider.
when('/main', {
templateUrl: 'main.html',
controller: 'MainCtrl'
}).
when('/about', {
templateUrl: 'about.html',
controller: 'MainCtrl'
}).
when('/services', {
templateUrl: 'services.html',
controller: 'ServicesCtrl'
}).
when('/contact', {
templateUrl: 'contact.html',
controller: 'ContactCtrl'
}).
otherwise ({redirectTo: '/main'});
}])

.controller('MainCtrl', ['$scope' ,function($scope){

}])

.controller('ServicesCtrl', ['$scope', '$http', function($scope, $http){
$http.get('services.json').then(function(response){
console.log("ServiceCtrl");
});
}])

.controller('ContactCtrl', ['$scope' ,function($scope){

}]);

And when I open the console I get the message: "ReferenceError: http is not defined"

Anyone got any suggestions as to how I can solve this?