https://codepen.io/a_shokn/pen/yEJpww?editors=1010
var myApp = angular.module('myApp', ['ngRoute']);
myApp.config(function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'main.html'
})
.when('/second',{
templateUrl:'second.html'
})
});这是我的代码片段的链接,我的问题是,当在anjular js中使用路由时,我们是否必须保留我们的文件(在我的例子中是main.html和second.html
https://stackoverflow.com/questions/50780447
复制相似问题