template和templateUrl区别与联系

templateUrl其实根template功能是一样的,只不过templateUrl加载一个html文件,template后面根的是html的标签.

.state('menu.about', {
        url: "/about",
        template: '<p>Hello</p>',
      });
.state('menu.about', {
        url: "/about",
        templateUrl: "menu.html"
      }); 

本文来自博客园,作者:广林,转载请注明原文链接:https://www.cnblogs.com/guanglin/p/5200057.html

原文地址:https://www.cnblogs.com/guanglin/p/5200057.html