作者:打个的故事 | 来源:互联网 | 2024-10-08 13:59
123456789101112131415161718192021222324var m1=angular.module('myApp', ['ui.router']);m1.component('i
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| var m1=angular.module('myApp', ['ui.router']);
m1.component('index',{
template:' {{name}}',
});
m1.component('user',{
template:'{{name}}',
});
m1.config(function($stateProvider) {
var indexState = {
name: 'index',
url: '/index',
component:'index'
}
var userState = {
name: 'user',
url: '/user',
component:'user'
}
$stateProvider.state(indexState);
$stateProvider.state(userState);
}); |
求问,这里 两个state里的template内容在浏览器没显示出来,求问原因?