문제

Recently, I use phonejs to develop a new project.

And I want to transfer parameters in different view, I know it can define the route like:

AppNamespace.app.router.register(":view/:personId/", { view: "view_home",personId:'' });

However, when I want transfer an array in different views, it seems not so realizable. What is the best way to transfer an array in different view?

Can anybody help? Thx : )

도움이 되었습니까?

해결책

You can set the array to the app namespace and access it on any view...

AppNamespace.MyArray = [Whatever...]

This will be accessible anywhere via AppNamespace.Myarray

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top