易学问答
  • 首页
  • 话题
  • 动态
  • 专家
  • 文章
  • 作者
  • 公告
  • 更多
    • 积分规则
登录 或 注册
  • 首页
  • 话题
  • 动态
  • 专家
  • 文章
  • 作者
  • 公告
  • 积分规则
 发表新帖
发表新帖

Angularjs How do you call a controller method inside a javascript function defined in the html template file?

前端 未结
关注
 2  1775
清酒与你
清酒与你 2021-01-16 09:16

I read this link: AngularJS access scope from outside js function and I tried to get access to the controller but I didn\'t setup my index.html like the fiddlejs example.

2条回答
  •  情歌与酒
    情歌与酒 (楼主)
    2021-01-16 10:03

    I figured it out with help from a friend. Here is the solution:

    in the signin.html file add an id to the div at the top. In the script code use that id to get to the scope using jquery (you don't need to use the angular.element()).

    signin.html

    0 讨论(0)
    查看其它2个回答
    提交评论

    •  加载中...
 看不清?
提交回复
热议问题