I'm working on angularJs and typescript project. I have to make synchronous http call and get some data from server before I launch my client app and load UI. I search on internet and see everybody speak about promise, huumm okay why not. So I use promise (make $http call and use $q to return promise) in my app.run(). Maybe I'm missing nothing because this is not working at all. Angular launch app.config(), then app.run(), ... But Angular does not wait app.config() finish before launch app.run(). So my first promise is launch in app.run() and before it resolve Angular try to instantiate controller... I don't want to create new service call httpSynchronous but I haven't any other ideas.
Subscribe to:
Post Comments (Atom)
c++ - Does curly brackets matter for empty constructor?
Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...
-
In K-PAX , there are two possible explanations: Prot is crazy. He is truly an alien. There are facts that indicate 1, but also 2. Examples: ...
-
Why this works? I mean, accessing the private variable. class Test { private $q = 0; public function __construct() { $this-...
-
I found this excellent tutorial on regular expressions and while I intuitively understand what "greedy", "reluctant" an...
No comments:
Post a Comment