简体   繁体   中英

Angular Strap module won't inject into my application

I'm trying to get Angular Strap working.

I can have a controller where data binding works. Then when I add ['mgcrea.ngStrap'], the data binding breaks. It literally just says {{example-value}} instead of the value.

angular.module('myApp', ['mgcrea.ngStrap']);

Can someone please give the example javascript code for Angular Strap? Maybe we can use the datepicker as an example?

I think part of the problem might be loading it with the MEAN stack. If I put ng-controller="MainCtrl" in the < body > of my default layout.html, the views/header won't load. So basically nothing on the page loads. Here's the data-ng-include code from the views/layouts/default.html

    <div class="navbar" data-ng-include="'views/header.html'" data-role="navigation"></div>
  • the angular strap javascript files are included at the bottom of the html page
  • The < body > won't let me do ng-controller="MainCtrl"
  • angular.module('MyApp').controller ETC works for data binding but angular strap still isn't there. So the controller is set up correctly
  • angular.module('MyApp', ['mgcrea.ngStrap']).controller ETC breaks the data binding that once worked and angular strap isn't there

我在其他地方找到的答案是,角度带依赖于角度动画,因此请确保将其包括在内。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM