parsing JSONP $http.jsonp() response in angular.js

UPDATE: since Angular 1.6 You can no longer use the JSON_CALLBACK string as a placeholder for specifying where the callback parameter value should go You must now define the callback like so: $http.jsonp(‘some/trusted/url’, {jsonpCallbackParam: ‘callback’}) Change/access/declare param via $http.defaults.jsonpCallbackParam, defaults to callback Note: You must also make sure your URL is added to the trusted/whitelist: $sceDelegateProvider.resourceUrlWhitelist or … Read more

In AngularJS, what’s the difference between ng-pristine and ng-dirty?

The ng-dirty class tells you that the form has been modified by the user, whereas the ng-pristine class tells you that the form has not been modified by the user. So ng-dirty and ng-pristine are two sides of the same story. The classes are set on any field, while the form has two properties, $dirty and $pristine. You can use the $scope.form.$setPristine() function to reset a form to … Read more

How npm start runs a server on port 8000

If you will look at package.json file. you will see something like this This tells start a http-server at address of localhost on port 8000 http-server is a node-module. Update:- Including comment by @Usman, ideally it should be present in your package.json but if it’s not present you can include it in scripts section.