Javascript 路线和传单声明指令
我对Angular很陌生,我正在尝试制作一个学习用的小应用程序 我使用了传单指令,还想添加Javascript 路线和传单声明指令,javascript,angularjs,leaflet,angular-leaflet-directive,Javascript,Angularjs,Leaflet,Angular Leaflet Directive,我对Angular很陌生,我正在尝试制作一个学习用的小应用程序 我使用了传单指令,还想添加NgRoute指令,但控制台中有一些错误 这是我的密码: var app = angular.module('demoapp', ['leaflet-directive'], ['ngRoute']); app.controller("toulouseController", [ '$scope', '$http', function($scope, $http) { angular.extend($s
NgRoute
指令,但控制台中有一些错误
这是我的密码:
var app = angular.module('demoapp', ['leaflet-directive'], ['ngRoute']);
app.controller("toulouseController", [ '$scope', '$http', function($scope, $http) {
angular.extend($scope, {
osloCenter: {},
markers: {},
defaults: {
scrollWheelZoom: false
}
});
我不知道我是否不能同时声明两个指令
谢谢你的帮助 试试这个:
var-app=angular.module('demoapp',['folic-directive','ngRoute')代码>
这应该行。根据AngularJS,angular.module的语法是
angular.module(name, [requires], [configFn]);
所以你应该使用
angular.module('demoapp', ['leaflet-directive','ngRoute']);
/\
||
||
||
All dependencies should be specified in single array.