خرید بک لینک

Vote count: 0

In app.js file I am trying to call another js file with my controller, as I call another file?

I'm trying to use controllerURl, but he insists on calling my standard file controllers.js

App.js ->

.state('app.mapa', {
  url: '/mapa',
  views: {
    'menuContent': {
      templateUrl: 'templates/mapa.html',
      controllerUrl: 'controllers/mapa.controller'
    }
  }
})

mapa.controller.js

var app = angular.module("myModule", []) 
.controller("myController", function ($scope, $http) 
  { 
    console.log("teste");
    $http.get("http://localhost:20432/WebService1.asmx/listPessoas") 
    .then(function (response) { $scope.pessoas = response.data; }); });

Template - > Mapa.html

<html ng-app="myModule">
  <head>
    <meta charset="utf-8">
    <title>Map</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">

    <link href="//code.ionicframework.com/nightly/css/ionic.css" rel="stylesheet">
    <script src="//code.ionicframework.com/nightly/js/ionic.bundle.js"></script>
  </head>
  <body ng-controller="myController" data-ng-init="init()">
    <ion-header-bar class="bar-dark" >
      <h1 class="title">Map</h1>
    </ion-header-bar>
    <ion-content>
      <div class="map-container" ng-show="$root.enableMap">
        <div id="map" data-tap-disabled="true"></div>
      </div>
    </ion-content>
  </body>
</html>

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 10 مرداد 1395 ساعت: 9:26

صفحه بندی