How to include one partial into other without creating a new scope?

后端 未结 4 1908
后悔当初
后悔当初 2020-12-02 14:10

I\'ve this routes.

// index.html
One Two
4条回答
  •  悲哀的现实
    2020-12-02 14:15

    The documentation for ngInclude states "This directive creates new scope." so this is by design.

    Depending on the type of interaction you are looking for you may want to take a look at this post for one way to share data/functionality between the two controllers via a custom service.

提交回复
热议问题