javascript - How to make an Angular.js app in Plunker -


i'm trying make example angular4 in plunker. however, don't know how make works. see how should done in correct way.

myplunker example should this: firstnames url , show them. when user clicks on of these firstnames see entry's firstname, lastname , email...

plunker link

var app = angular.module('app', []); app.controller('mainctrl', function($scope, myservice){  var getfirstname = function(){     myservice.getfirstname(function(data){     $scope.user = data;   }); };  getfirstname();  });  app.service('myservice', function($http){ return{     getfirstname: function(callback){         $http.get('http://hjgz2l4w8r2zvaym4-mock.stoplight-p roxy.io/api/users').success(calback);     } } }); 


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -