angularjs - load jsonp into multiple anglarjs controllers -
I have a jsonp call on the server that gives two object-containing objects. At this time I make jsonp calls with jQuery because I have still started learning angular and I do not know how this is done. I data.filters in navController and data.results in contentController What is the correct way to get it with angular? (function ($, angular) {$ (function () {$ .ajax ({jsonp: "JSONPCallback", url: 'myUrl', data type: 'jsonp', success: Function (data) {// data = {"Filters": {...}, "results": {...}}}}};}); var app = angular. Module ('app', [] ); Var Controller = {}; Controller .navcontroller = function ($ scope) {$ scope.filters = [{}};} Controller Content Controller = Function ($ scope) {$ scope.results = [{}};} ; App.controller (Controller);}) (JQuery, Angular); Hello Please see here var app = angular module ('plunker', []); app.service ('d Tatasva ', function ($ http) {var url = "htt...