angularjs service calling $location.path is it against best practices?

guilhebl

I am using a service in angularJS where I call $location.path inside one method in order to make a route change after a success or failure response from another service internally. Is this against Angular's best practices?

guilhebl

Based on inputs given by other members, calling $location.path inside a service is against Angular's best practices instead it should be called in a controller.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Angularjs - changing location.path from modal

분류에서Dev

Audio synthesis best practices

분류에서Dev

AngularJS $ location.path 관련 문제

분류에서Dev

$ location.path () 대 $ http.get ()-AngularJS

분류에서Dev

$ location.path () 대 $ http.get ()-AngularJS

분류에서Dev

$ location.path 대신 angularjs 일반 탐색

분류에서Dev

Gatsbyjs Page generation | Best practices

분류에서Dev

Rails best practices of using layouts

분류에서Dev

AngularJS custom validation against a resource

분류에서Dev

angularjs $ location.path.replace가 작동하지 않음

분류에서Dev

AngularJs : $ location.path가 제대로 작동하지 않습니다.

분류에서Dev

사용자 정의 URL에 대한 AngularJS location.path

분류에서Dev

AngularJS $ location.path가 리디렉션되지 않음

분류에서Dev

best approach and practices to handle exceptions in Spring?

분류에서Dev

Best practices on using sudo in a bash script

분류에서Dev

Passing Fragment some variable best practices

분류에서Dev

Best practices Boolean vs Integer in SQL

분류에서Dev

Repository pattern interfaces- Best practices?

분류에서Dev

What are the best practices for including CSS and JavaScript in a page?

분류에서Dev

Best practices for installing ubuntu alongside Windows 10

분류에서Dev

PATH, resolve location of exe

분류에서Dev

$location error in angularJS

분류에서Dev

AngularJS 및 PhoneGap : $ location.path로 인해 후속 tempateUrl 조회가 실패 함

분류에서Dev

AngularJS에서 $ location.path ()와 함께 Querystring을 사용하는 방법

분류에서Dev

Angularjs : 단위 테스트를 위해 spyOn을 사용하는 mock location.path ()

분류에서Dev

AngularJS $ location.path ()가 returnUrl에 대해 작동하지 않습니다.

분류에서Dev

동일한 상태의 Angularjs location.path가 작동하지 않습니다.

분류에서Dev

AngularJS: $watch other service in a service

분류에서Dev

accessing multi endpoints web services (ASMX) best practices in c#

Related 관련 기사

  1. 1

    Angularjs - changing location.path from modal

  2. 2

    Audio synthesis best practices

  3. 3

    AngularJS $ location.path 관련 문제

  4. 4

    $ location.path () 대 $ http.get ()-AngularJS

  5. 5

    $ location.path () 대 $ http.get ()-AngularJS

  6. 6

    $ location.path 대신 angularjs 일반 탐색

  7. 7

    Gatsbyjs Page generation | Best practices

  8. 8

    Rails best practices of using layouts

  9. 9

    AngularJS custom validation against a resource

  10. 10

    angularjs $ location.path.replace가 작동하지 않음

  11. 11

    AngularJs : $ location.path가 제대로 작동하지 않습니다.

  12. 12

    사용자 정의 URL에 대한 AngularJS location.path

  13. 13

    AngularJS $ location.path가 리디렉션되지 않음

  14. 14

    best approach and practices to handle exceptions in Spring?

  15. 15

    Best practices on using sudo in a bash script

  16. 16

    Passing Fragment some variable best practices

  17. 17

    Best practices Boolean vs Integer in SQL

  18. 18

    Repository pattern interfaces- Best practices?

  19. 19

    What are the best practices for including CSS and JavaScript in a page?

  20. 20

    Best practices for installing ubuntu alongside Windows 10

  21. 21

    PATH, resolve location of exe

  22. 22

    $location error in angularJS

  23. 23

    AngularJS 및 PhoneGap : $ location.path로 인해 후속 tempateUrl 조회가 실패 함

  24. 24

    AngularJS에서 $ location.path ()와 함께 Querystring을 사용하는 방법

  25. 25

    Angularjs : 단위 테스트를 위해 spyOn을 사용하는 mock location.path ()

  26. 26

    AngularJS $ location.path ()가 returnUrl에 대해 작동하지 않습니다.

  27. 27

    동일한 상태의 Angularjs location.path가 작동하지 않습니다.

  28. 28

    AngularJS: $watch other service in a service

  29. 29

    accessing multi endpoints web services (ASMX) best practices in c#

뜨겁다태그

보관