ReferenceError: $modal is not defined when trying to add an angularjs modal window

☆樱花仙子☆ 提交于 2019-12-11 21:57:44

问题


I get that error when I'm trying to implement this http://mgcrea.github.io/angular-strap/#modal in my application. Why is it so? Maybe I haven't added something correctly?


回答1:


Looks like you forgot to declare dependency.
In their documentation on github you can find this:

Inject the $strap.directives into your app module

var app = angular.module('angularjs-starter', ['$strap.directives']);


来源:https://stackoverflow.com/questions/18783974/referenceerror-modal-is-not-defined-when-trying-to-add-an-angularjs-modal-wind

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!