1) I stumbled upon this concept called Law of Attraction that states if you think positive you will attract positive and if you think negatively you will also attract negativity.
Is this compatible with Islam?

2) In Islam we say that we should ask our desire only to Allah now in the other hand we had the law of attraction that says that you can get what you want just by thinking about it. Is this considered asking besides Allah swt?

1) We do have hadiths that might support this theory. A number of narrations indicate when we are positive, we make those around us positive, and we avoid negativity around us. Negative thoughts also bring about a negative environment around a person. Hence, one hadith stats that negative thoughts are like smoke. It doesn’t burn but it pollutes the environment.

2) A believer is recommended to dedicate everything for God, and channel his desires in the path of God. As long as you keep your desires in the halal circle, and you make sure you are not allowing your desires to push you to commit haram, then you are essentially dedicating your desires to Allah.